Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis for API calls

Redis is single threaded yet it is fast. Can we use Redis database for API calls as APIs call is concurrent in nature? Is Redis capable of handling multiple API call requests?

like image 885
Arti Negi Avatar asked Feb 15 '17 09:02

Arti Negi


People also ask

Does Redis support REST API?

REST Redis Service provides an easy-to-use and powerful way to create REST API calls to the Redis server.

What is Redis in API?

Redis, which stands for Remote Dictionary Server, is a fast, open source, in-memory, key-value data store.

Does Redis have an API?

Redis modules have two different APIs in order to access the Redis data space, one is a low level API that provides very fast access and a set of functions to manipulate Redis data structures.

How do I cache API?

Caching in REST APIs Usually, browsers treat all GET requests as cacheable. POST requests are not cacheable by default but can be made cacheable if either an Expires header or a Cache-Control header with a directive, to explicitly allows caching, is added to the response.


1 Answers

Yes, you can use Redis at the database for a system that needs to support multiple concurrent API calls.

When you implement your API calls using whatever framework and language you are interested in using, if your API implementation needs to make a request to Redis, that call will wait on the accept queue for the socket until your request gets processed.

Many large websites use Redis as a database to implement APIs in the manner you suggest.

like image 151
Tague Griffith Avatar answered Sep 24 '22 09:09

Tague Griffith