In Chapter 2, Data Types and Chapter 3, Data Features, we showed that Redis provides many powerful APIs to manipulate the various kinds of data type. When you are going to develop your application with Redis, similar to the selection of data types mentioned in the previous Using the correct data types recipe, there is always more than one Redis API for you to implement certain business needs. To guarantee the performance of a Redis instance, extreme caution must be taken when you make the decision on which API you will use.
In this recipe, we'll take a look at several examples to learn how to use correct APIs to achieve a good performance in Redis.