[PATCH] upstream keepalive: save and restore connection data

Maxim Dounin mdounin at mdounin.ru
Mon May 2 20:08:24 UTC 2022


On Mon, May 02, 2022 at 08:41:40AM +0500, RekGRpth wrote:

> I think, my suggested in patch solution is more clear and easy and
> beauty, than using cleanup handler to save any connection-specific
> data within a cached connection.

To re-iterate:

- Your suggested patch does nothing for nginx itself where the 
  upstream module infrastructure is used by the upstream module, 
  and c->data points to the request, so saving it will just waste 
  resources.  Your patch only makes sense for your module (which 
  is basically a hack by design).

- There is a proper way to do what you are trying to do, not 
  limited to your module.  You are free to use it, much like other 
  modules do.

Hope this helps.

Maxim Dounin

More information about the nginx-devel mailing list