Peter,

I have done 4D Client load balancing with NGINX and NTK for several years.
In the last few months we have been working on a project to convert from 4D
Methods to Active4D as our html generation mechanism.  We have written our
own session storage to the database and it seems to work quite well.

Saving the session data to 4D records solves a couple of problems for you.

1.  You do not have to bind a web user to a single 4D Client webserver.
This is a big deal because if a particular webserver fails all clients bound
to that webserver lose their state.

2.  If you have to restart a client or 4d server for some reason all of you
sessions are maintained.  This is not the case in A4D's current memory based
session handling.

3.  Having load balancing with 4D Clients can really help with performance
of your site under heavy load.  It really helps solve the problem that 4D
can only use 1 CPU core for executing 4D code.


A couple of drawbacks with load balancing are:

1.  If you get a webserver that is slow to respond to a request the request
can be submitted to the next webserver.  You can end up with duplicate
records as a result of this.  You have to code defensively for this
situation.  Semaphores are your friend for handling this.

2.  Record based sessions are just not as fast as memory based.  I have not
found this to be a large problem but it's just not as fast.


Peter, if you want to chat further just drop me a line.

Thanks
Justin Will




_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/

Reply via email to