How to access data which is present in Azure Redis Cache. [HTTP Call]

Padhy, Ansuman 0 Reputation points
2024-08-28T20:48:31.5133333+00:00

Requirement is very simple, my application is capable to do a HTTPs call only. So I am trying to connect Redis Cache by doing a HTTP Call, after that do a read and write operation on the available azure Redis cache.

Current Progress : I am able to do a HTTP Call and can access the Azure Redis Cache Cluster but I don't know how to access the internal cache data (Key - Pair Values) which is present in side the cache.

Flow :

Postman -> HTTPS Call -> Azure Redis Cache

Could you please help me.

Regards

Ansuman P.

Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
260 questions
{count} votes

2 answers

Sort by: Most helpful
  1. TP 99,141 Reputation points
    2024-08-29T17:50:12.3066667+00:00

    Hi Ansuman,

    Redis clients use Redis Serialization Protocol (RESP) to access cache data., not HTTP. For this reason you either need to use one of the available Redis clients or you could use a middleware server software that makes Redis available via http.

    For example, you may consider setting up Webdis:

    https://github.com/nicolasff/webdis

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP


  2. Oury Ba-MSFT 19,571 Reputation points Microsoft Employee
    2024-08-29T22:12:21.0233333+00:00

    @Padhy, Ansuman

    Agreed with TP's answer above.

    Our service has a REST API, of course, but that only covers control plane operations. You can't use that to access the data plain and the actual Redis console. Redis is a server, that uses a TCP-based protocol for access rather than HTTPS. 

     The protocol is a public spec: Redis serialization protocol specification | Docs. And there are some posts about basically building your own client for it, like this: Building a Redis client from scratch in Go - DEV Community. But I don't think there's a way to just make HTTPS calls

    Regards,

    Oury

     


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.