Hello,
It is generally not a good idea to keep a database transaction open over multiple requests, if you need that you would need to bind the connection object to the session (which is I guess not easily possible in CGI or native code).
Those kinds of session questions are best asked in the matching projects (PHP?), not sure if PHP would allow that.
Gruß
Bernd
--
https://Bernd.eckenfels.net
________________________________
Von: M.P. Ardhanareeswaran <***@oracle.com>
Gesendet: Montag, Juli 23, 2018 3:53 PM
An: HttpClient User Discussion
Betreff: Re: so_reuseport and HttpClientConnection
Bernd:
I have a use case in which the client wants to perform a transaction that uses a database connection. The database connection is associated with a worker. The client has the URI to the database connection but the clients GET/POST etc. have to be routed to the correct worker/child. Cache doesnt figure in this design.
Something like this seems to be possible with reverse proxies. In my case, I am considering a handler/module. It may be a server side question. It may be that Ive to play with the URI for routing. IDK yet.
HttpRoute in the direct mode is driven by host/port. With SO_REUSEPORT, it almost seems like I need the remote port to distinguish/check out a connection from the pool manager. Or Ive to solve the problem in a different way on the server side.
With regards,
M.P. Ardhanareeswaran
Post by Bernd EckenfelsHello,
I am pretty sure there is no way to connect to a specific listener. However I am also pretty sure you would have to ask Httpd or Nginx projects instead.
However I am also sure that you normally dont need it, must of the caches are shared across all the workers (or sessions beeing sticky). Can you give a specific case where this is not the case?
Gruss
Bernd
--
https://urldefense.proofpoint.com/v2/url?u=http-3A__bernd.eckenfels.net&d=DwIF-g&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=c0nJ6OcgTgcBV2N1F7_XcSoSai9fe2ao0-El70rew7s&m=_-B4HIu_hQyCQd8z8kvBCEfX3LBA1Fb9uacKNZhqK6s&s=FEQZ8TAnu2wbSSon8V4j_NcA44luiG33Dqdop6n4NNw&e=
________________________________
Gesendet: Montag, Juli 23, 2018 5:46 AM
Betreff: so_reuseport and HttpClientConnection
In NGINX (and Apache HTTP server) multiple workers can be bound to a port. For example, multiple workers can be bound to say localhost:80 using the SO_REUSEPORT feature. When requesting a connection from the pool, is it possible to get a connection to a certain worker? There can be information cached in a certain worker and the application may want to connect to it.
With regards,
M.P. Ardhanareeswaran
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-***@hc.apache.org
For additional commands, e-mail: httpclient-users-***@hc.apache.org