In my opinion, this issue has largely been solved by the NoSQL and application messaging communities. But as long as the VCL web server(s) use local, file-based semaphores to control resource allocation, this will be a hard nut to crack.
If I were going to tackle this problem, I would take one of two general approaches: 1) Use an asynchronous messaging queue (i.e. Apache ActiveMQ or something like Redis) In this way, when a reservation is made, the request is pushed onto a centralized queue, and some intermediate (i.e. vcld) process will shift messages off the queue and assign the reservations. If we used ActiveMQ, the php and perl code would communicate with the message broker over the STOMP protocol [1]. Redis would also work because it runs in a single thread and all operations are atomic -- requests can simply be pushed onto a FIFO-type list structure [2]. 2. Use a NoSQL database such as CouchDB or Riak that uses a type of optimistic locking model for all writes. That is, if reservations are stored in such a way that the resource id (i.e. computer id) forms the database key, the assignment of a user to a particular compute resource requires sending the correct revision_id of that resource in order for the write to be successful. If successful, it returns an HTTP 200 status code and the client proceeds normally; otherwise, it sends a 409 header and it is up to the client to try again [3]. It would also be possible to use the existing MySQL database to emulate something like #2, but under a heavy load, I imagine that the row locking could really slow things down. Using Couch would really be much more scalable than trying to do everything in MySQL. Either of these approaches would then allow you to distribute the web front end across multiple machines. Cheers, Aaron Coburn [1] http://activemq.apache.org/stomp.html [2] http://redis.io/commands/lpush [3] http://wiki.apache.org/couchdb/HTTP_Document_API#PUT On Jul 17, 2013, at 1:06 PM, Aaron Peeler <[email protected]> wrote: > This is definitely desired. > > An additional challenge with multiple web servers is to figure how to > sanely lock/unlock the resource to prevent it from getting assigned > two separate users that are making requests at the same instant. > > AP > > On Wed, Jul 17, 2013 at 12:57 PM, James O'Dell <[email protected]> wrote: >> >> I also tried load balancing the web. I didn't have any success. >> >> I also tried an SSL offload using the F5 >> >> The SSLoffload didn't work because >> an internal VCL check noticed the header wasn't https >> and redirected to https. Basically it kept looping >> >> On 7/17/2013 9:36 AM, Dmitri Chebotarov wrote: >> >> Hi >> >> I would like to load balance multiple front-end VCL servers. >> It is F5 load balancer. The LB configuration allows to enable session >> persistency. >> Is this will be OK with VCL's front-end? I remember someone mentioned some >> issues with having multiple front-end servers, but don't remember details. >> >> Thanks. >> >> > > > > -- > Aaron Peeler > Program Manager > Virtual Computing Lab > NC State University > > All electronic mail messages in connection with State business which > are sent to or received by this account are subject to the NC Public > Records Law and may be disclosed to third parties.
