Questions

I will have a few thousand customers going to be on my website purchasing all at once (about 4K in a few minutes). Last 3 times I had this we had issues with bugs or server. I believe we've handled the server issues, we use Rackspace and scaled up more servers last 2 times & didn't see any issues with servers. But we had a few bugs each time that caused major issues. I've done testing myself and had 3 others review the site and I've corrected those issues. But really the problem is that we don't discover these bugs until we are hit with this much traffic all at once. I've done load testing using a third party site but that doesn't really show us bugs as it's not real users utilizing the site & preforming functions they would normally do. We also don't have much of any money to throw at this. FYI, with our web app/site our customers send their customers to purchase goods from our site, which charges them a fee based off the number in line they are to come to the site. This "number in line" model is what causes most of the complexity and problem. But we can't change that as it's what our customer's want.

How I would build this feature "take a number and go to the queue":

1. get a fast datastore central to you servers. All webservers have to look on the same central datastore, because this number has to be unique for each visitor. Redis would be perfect for this task.

2. you have to have a middleware layer in your Rails, Django or PHP setup. All HTTP-Requests have to go through this middleware layer. This middleware layer is reponsible for getting the ticket from Redis and set it as a cookie. If the browser has no cookie, it gets one. If you want to ensure that visitors can't fake the cookie, just add a secret to each cookie/ticket.
Doing this in another layer than middleware will result in bugs because you have to add the code at many different places.

3. Profit (as long as your caching etc. works and you don't get slash dotted)


Answered 10 years ago

Unlock Startups Unlimited

Access 20,000+ Startup Experts, 650+ masterclass videos, 1,000+ in-depth guides, and all the software tools you need to launch and grow quickly.

Already a member? Sign in

Copyright © 2024 Startups.com LLC. All rights reserved.