Re: KeepAlive settings for reverse proxy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2010-04-23 18:30, Mauri wrote:
Jonas, many thanks for your efforts to help me. Honestly I did not
understand what's the problem.

I think you need to read a tutorial or a book explaining how HTTP works. You seem to be confusing sessions with connections.


The anomaly I noticed is that:
Scenario A: client --> webserver application
The ActiveX (TeeChart) works. Sessions between client and WAS 2 are
always fixed (seeing the program TCPView on Windows)

Since HTTP is not a connection oriented protocol (even though it is normally used on top of TCP), sessions are independent from connections. Sessions in HTTP are usually handled by cookies, but can also be handled though query or post parameters.

I have absolutely no idea how your ActiveX thingy handles sessions.


Scenario B: client --> proxy --> webserver application
ActiveX (TeeChart) does not work. Sessions are many more as explained in
previous mail.

Sessions and connections are two very different things. One session can be kept across multiple TCP connections, and it is possible (protocol wise) to have multple sessions during one TCP connection.


What I want is a test for setting the proxy between the client -> proxy
-> application only persistent sessions.

You do not need persistent connections to have persistent sessions.

If your application uses cookies for sessions, you should check what the cookies looks like. Especially you should check what (if any) host the cookies are issued for. A host mismatch may make the browser ignore them.


To do this I made these settings are correct?

Not entirely. But it's hard to know since I don't know your setup or your application. How doid it work when you tried it out on your test setup?


> ProxyPassReverse http://10.173.90.171/ keepalive=On

As written outside of a container, this makes no sense. The ProxyPassReverse directive needs to know what to change how.

Also, this is the wrong place to add the keepalive option. Sorry about that. See more below.

Inside a suitable location container and without the keepalive=on, the statement seems correct.

If your backend puts something else instead of http://10.173.90.171 in headers handled by ProxyPassReverse, you'd need to add a ProxyPassReverse for that. Please read the documentation at:
<http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreverse>

This does not take care of cookie based sessions though. If your application issues session cookies with hostnames/domains you need ProxyPassReverseCookieDomain as well. Please read:
<http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreversecookiedomain>


> MaxKeepAliveRequests 0
> KeepAliveTimeout 60
> KeepAlive On

These settings configure wether or not to allow a browser to use persistent TCP connections to your proxy. This does not mean that the browser actually uses persistent connections, though most modern browsers are likely to do so.

It does not configure sessions.


> ProxyPassReverse http://10.173.90.171/ keepalive=On

This is wrong, and I apoligize for that. It was my mistake. (Of course, if you had actually followed my advice and link and read the documentation, and had read the rest of my replies, that should have been clear.)

It should have been:
ProxyPass / http://10.173.90.171/ keepalive=On

Please note that this keepalive option means that the proxy tries keep persistent connections to the backend from dropping out by regularly sending a keepalive request. This only makes a difference if the backend allows persintent connections, the server tries to use them, but for some reason they are sometimes dropped.

Regards
/Jonas
--
Jonas Eckerman
Fruktträdet & Förbundet Sveriges Dövblinda
http://www.fsdb.org/
http://www.frukt.org/
http://whatever.frukt.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux