Redis

 View Only

 If i setup a redis cluster connected with haproxy, will every site added in haproxy be cached by redis?

alexis evora's profile image
alexis evora posted Dec 19, 2018 02:59 PM

 

Daniel Mikusa's profile image
Daniel Mikusa

Sorry, you would need to provide more information before anyone can answer this question. How are you setting up the Redis cluster? How are you configuring HAproxy? etc.. Can you provide some more detail here? Thanks.

Daniel Mikusa's profile image
Daniel Mikusa

Ah, OK. What about this part of your question? `will every site added in haproxy be cached by redis`? What sites are you referring to here? Are you using KB with tc Server to put session data in Redis?

 

https://community.pivotal.io/s/article/How-to-setup-Redis-Session-Manager-on-tcServer-Tomcat

Daniel Mikusa's profile image
Daniel Mikusa

If you are configuring HAProxy to be a reverse proxy for a set of web sites, it won't care about the session information. A reverse proxy doesn't need the session data for anything, it's just forwarding the traffic along.

 

The actual site/application is what manages the session data. This is also what you would configure to store session data in Redis.

 

For example, if I have HAProxy in front of Tomcat. Tomcat is running my Java app. Tomcat is what stores session data. Tomcat is what would talk to Redis to make sure session data is safely stored in Redis.

alexis evora's profile image
alexis evora

i setup it following this tutorial https://community.pivotal.io/s/article/How-to-setup-HAProxy-and-Redis-Sentinel-for-automatic-failover-between-Redis-Master-and-Slave-servers

 

alexis evora's profile image
alexis evora

in case of a data center and haproxy is used as reverse proxy to redirect sites, will redis recive data from every sites on haproxy?

alexis evora's profile image
alexis evora

I get it. thanks alot