[Seaside] Nginx Load-Balancing Experiences ?

Sven Van Caekenberghe sven at stfx.eu
Thu Apr 24 12:53:00 UTC 2014


Hi,

I want to share the nginx configuration I am currently using and that seems to work fine:

===
upstream t3-mobile {
  ip_hash;
  server localhost:9090;
  server localhost:9091;
}	 

server {
  listen 443 ssl;
  server_name XXX;

  ssl_certificate /home/ubuntu/t3-mobile/XXX.chained.cert;
  ssl_certificate_key /home/ubuntu/t3-mobile/XXX.key;

  location /files {
    alias /home/ubuntu/t3-mobile/static-files;
    try_files $uri @seaside;
    gzip on;
    gzip_types application/x-javascript text/css;
    expires 30d;
  }

  location / {
    proxy_pass http://t3-mobile;
    add_header X-Server Pharo;
  }

  location @seaside {
    proxy_pass http://t3-mobile;
    add_header X-Server Pharo;
  }
}
===

I any case, it gives me an all A score on YSlow (except for the CDN usage).

I deploy my static resources from FileLibraries to the filesytem.

I share some session state in a memcached instance, mainly for recovering expired sessions.

The web app accesses a large REST based system, so does not do its own persistency.

I am happy - thanks for keeping Seaside alive !

Sven

On 26 Mar 2014, at 15:10, Sven Van Caekenberghe <sven at stfx.eu> wrote:

> Thanks Johan, that was interesting.
> I am still reading other documentation.
> 
> On 26 Mar 2014, at 12:13, Johan Brichau <johan at inceptive.be> wrote:
> 
>> Hey Sven,
>> 
>> We use session affinity based on the seaside session parameter.
>> I think you will find what you need in this article:
>> 
>> http://johanbrichau.blogspot.be/2012/05/when-to-use-http-session-affinity-in.html
>> 
>> There are other nginx modules to achieve session affinity based on another parameter too, but I do not remember what they were.
>> 
>> regards,
>> Johan
>> 
>> On 26 Mar 2014, at 12:08, Sven Van Caekenberghe <sven at stfx.eu> wrote:
>> 
>>> Hi,
>>> 
>>> I am about to try to figure out how to do sticky load-balancing for multiple Seaside instances using Nginx (I know how to do it using Apache).
>>> 
>>> I currently have this working:
>>> 
>>> upstream t3-mobile {
>>>       server localhost:9090;
>>> #        server localhost:9091;
>>> #        server localhost:9092;
>>> #        server localhost:9093;
>>> }        
>>> 
>>> server {
>>>      listen 443 ssl;
>>> 
>>>      location / {
>>>               proxy_pass http://t3-mobile;
>>>      }
>>> }
>>> 
>>> I just have to get the stickiness in. There seems to be a difference in available options between the open source and commercial versions.
>>> 
>>> Any experiences, recommendations, pointers ?
>>> 
>>> TIA,
>>> 
>>> Sven_______________________________________________
>>> seaside mailing list
>>> seaside at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> 
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 



More information about the seaside mailing list