For a special day where we expect up to 10x more orders in one hour as normal we would like to implement a user queue / wait page* like it is common for tickets shops if you have a heavy peak.

Any suggestions to implement it?

Our first try:

Route all request via htacces to a Magento independent queue.php to handle and calculate max users and their sessions. If max users not reached route to index.php If max users reached show queue page with a countdown to reload and numbers of users "in front" of queue.

It would work without varnish but with this caching mechanism queue page is also cached and shown to users.

Maybe the logic has to be implemented into varnish?

Our stack is:

  • load balancers with varnish
  • Magento frontend server with PHP and Redis on dedicated servers
  • dedicated database servers, master and slave
  • dedicated file server

Btw. More hardware is no option, we can handle 1000 orders per hour but not 10.000.

Sorry I have no better words than "user queue / wait page"

  • I found 3 possible approaches which could be solutions. Because they are only ideas I would not post it as answer. a) Use .probe(status.php) function of Varnish b) Proxy service in front of varnish to handle all requests c) Ajax-request in Magento on every page to check user and route to queue page or let him in Magento
    – waltavista
    Apr 21 '16 at 12:53
  • i think optimization and extra hardware is the only option here.
    – MagenX
    May 10 '16 at 11:42

If the problem is getting a lot of orders at once, the problem is going to be MySQL/the database as the bottleneck.

Varnish/caching will help with the frontend while customers shop and browse, but won't help your checkout at all, because the checkout will not be cached through varnish or what you choose.

You need to scale, and your server configuration should be such that you are prepared for peak traffic, not average traffic.

Otherwise, I think you'll have to be really clever about it, perhaps you can queue all the orders and process them later in some way? Then you won't lose business.

If you show a customer a waiting page they probably won't come back unless you have a product they can't live without. Queuing is for MMOs not online stores :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.