Redis provides us with two commands that allow us to get one or more random members from a given set – SRANDMEMBER and SPOP.
Actually, the commands are slightly different in that one deletes the random member whereas the other doesn’t, and so the command you choose will depend on whether or not you want to delete the random member at the same time.