Replacing apache with nginx
mike
mike503 at gmail.com
Tue Sep 30 23:50:16 MSD 2008
On Sep 30, 2008, at 12:20 PM, Gena Makhomed <gmm at csdoc.com> wrote:
> On Tuesday, September 30, 2008 at 21:30:53, mike wrote:
>
>>> Sessions need to be sticky - so the user goes to the same server
>>> all the time, after the session is started.
>
> yes, it is possible: use ip_hash directive of ngx_http_upstream
> module.
>
> m> i'm always curious why people require sticky sessions.
> m> with database-backed or some other central storage
> m> (hell even files over NFS) i don't see the need for this at all.
> m> i've never used session affinity and i've never had a single
> issue...
>
> there is one good reason: shared session storage is single point of
> failure.
And per-server session affinity is no different. Still a single point
of failure. Also if sessions are that important you can easily make
central session management redundant. Not to mention to make session
affinity based approaches redundant you have to add in some sort of
central or redundant facility built in... Would be a waste of time at
that point to not just simplify life with a central storage manager.
To OP: sorry I misunderstood your /xml comment. I thought it was just
an example uri.
>
>
>>> 3) All http traffic needs to be coerced to https apart from www.mysite.com/xml
>
> m> use a rewrite. that should work. or if it's a unique hostname you
> could do a
>
> m> server {
> m> listen 80;
> m> server_name foo.com;
> m> rewrite ^(.*) https://foo.com/$1 last;
> m> }
>
> unique location quite enough:
>
> server {
> listen 80;
> server_name example.com;
> location /xml {
> rewrite ^ https://example.com$request_uri permanent;
> }
> }
>
> --
> Best regards,
> Gena
>
>
More information about the nginx
mailing list