Custom Sticky Module development
bobbob601 at hotmail.com
Wed Nov 6 20:24:03 UTC 2019
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.
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<https://go.microsoft.com/fwlink/?LinkId=550986> pour Windows 10
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx