Quantcast
Channel: Drupal Groups - database
Viewing all articles
Browse latest Browse all 29

Handling large spike of un-cachable requests.

$
0
0

Hi all.

I've been tasked with building a high performance, high capacity website for a client and so have been reading up on best practices. I'm getting familiar with the cache based approach for both authenticated and anon. users, APC, varnish etc - however I'm finding it difficult to find best practices regarding non-cachable requests.

-- EXAMPLE --

Suppose my website were to give away 500 free donuts to the first 500 people who correctly answer a multiple choice question. This figure would be stored in a field called "QTY" on the "freebie" content type.

Also suppose that this "offer" goes live at 1pm and that as many as 12,000 authenticated users try to claim all at once...

-- END --

Initially I thought about simply loading the node, reducing QTY by 1 and repeating until QTY reaches 0. To me though this method (aside from being very inefficient?) seems like it would place a massive load on the server?

I guess bypassing loading the node would be a start? Even better if we could bypass the entire bootstrap? Perhaps a custom module could load the initial QTY value and then handle all the incoming requests? So many potential options and I have no idea where to start!

What would be considered best practice for handling these kinds of situations? I suppose simply adding a layer of web servers behind a load balancer would help, but what could one do in terms of coding and as a general approach to such situations?

Thanks!

AttachmentSize
process.jpg51.45 KB

Viewing all articles
Browse latest Browse all 29

Trending Articles