Re: [Quickfix-developers] Newbie: Session management in load balanced situation?
Brought to you by:
orenmnero
From: Caleb E. <cal...@gm...> - 2005-03-08 19:44:39
|
On Tue, 8 Mar 2005 12:57:38 -0600, David Kuik <dav...@pr...> wrote: > I'm wondering how the engine manages sessions and message sequencing in a > load balanced environment. Does each server in the farm to manage a > separate session or do they somehow share a session? > > I'm trying to understand how this will work in a fault-tolerant 7x24 > environment that supports 1000's of users. Can someone offer some comments? You could load balance sessions across multiple machines using a database-backed message store (e.g. MysqlStoreFactory). All of the session state is persisted to the database. You could run a number of Acceptors in parallel on different machines, each configured to accept all of your MySQL-backed sessions (e.g. same config file). However I don't think there is currently a facility in QF for "locking" a session across multiple engines. In other words, if client A connects to server 1, that session should be "locked" in some way so any attempt to use it on servers 2 through n would result in an error in the same way that connecting to that session a second time on server 1 would. A similar approach would be to use the FileStoreFactory and share all the session state on an NFS mounted filesystem. -- Caleb Epstein caleb dot epstein at gmail dot com |