Custom Sticky Module development

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Custom Sticky Module development

bob bob

 

 

Hi guys

 

We have a use case when we plan to use Nginx as our load-balancer with a session persistence requirement. We are using it in the context of Kubernetes. Nothing special here

Our specific need is that each user will have one non-shared pod which means that once a upstream server is assigned to one session, it should not be assigned to another user.

To simplify the architecture, we have a Redis cache storage were the list of available servers is listed, which means that each time a user is redirected to a server, the server notifies the Redis that he is not available for assignment but still available for traffic (that’s why we can’t use health probes because we want the traffic to continue to be redirected but only for one user

 

We think about development a fork of the stick module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/src/master/) and make it read the list of availables pods from Redis instead of the in memory list of all upstreams server.

 

Questions :

  1. Does it seems feasible ?
  2. It is better to overwrite the sticky module and edit its code (seems to be a built-in module)
  3. Is it better to develop and load a custom module .so but then how ensure it can be loaded instead of the builtin module ?

 

Thank a lot for your help and thoughts

 

 

 

 

 

Provenance : Courrier pour Windows 10

 

 

 

 


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx