Click here to Skip to main content
13,901,026 members
Rate this:
Please Sign up or sign in to vote.
See more:
Suppose 1000 users hit your site simultaneously so
how would you maintain the stability ?
How would you maintian the session between the pages on User Hits ? (In MVC and C#)
Or How would you maintain the scalabilty of site ? 

What I have tried:

Tried Googling but found nothing in Specific
Updated 1-Dec-18 18:31pm
Sinisa Hajnal 30-Nov-18 2:53am
You wouldn't. Session is (or should be) per user, so no problem there, it should work. Scalability and throughput are determined by your host. If your current provider cannot handle the volume (or your current tariff doesn't) you may need to upgrade your package or change the provider.
Only thing you can change is your code so make sure it is performant, find out any chokepoints and resolve them (there are tools for such testing) general, if you have good, performant code, only thing you can change is your infrastructure.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

So your main issue is really, how would you scale to 1,000 users all at once.

Given the vagueness of this question and lack of knowledge about your personal app you are inquiring about, this will be pretty high level.

There are many ways to solve your problem but here is probably the most common.

Sessions are by user (as Sinisa mentioned) so they should be handled accordingly. You can save session info to a DB or via cookie (in mvc its likely via cookie).

As for handling the users you'd want to look into load balancers. There is a lot of writing and how to's on this topic but in short, load balancers allow you to have more than one server accessible via a single URL with the capability to handle extreme loads.

Load Balancer[^]


Database are typically a bottleneck. Depending on what your app does you'll likely want to look into caching options (memcache, redis, amazon elasticache....many options). This creates its own issues (invalidating/refreshing the cache) but it frees up some of your DB operations from being the bottleneck in your application.

Redis: What and Why? – codeburst[^]

Amazon ElastiCache- In-memory data store and cache[^]

A google search about caching in mvc/.net will provide plenty of links to read through.

There are additional options here including DB sharding for load balancing but now we are getting into advanced topics beyond the scope of a quick answer forum.

I'd also suggest doing searches on advanced scaling topics/scalability topics to read up on as well.
vaibhav1800 4-Dec-18 14:25pm
Lets say ok ? Suppose 1000 users are logged in to Amazon and still the site is fast for me and it is not slowing down. Just want to know scalability is maingained here ?
David_Wimbley 4-Dec-18 16:25pm
my above answer still would apply. Its nothing terribly magical, more resources are required to meet the needs of your traffic. Amazon isn't ran on one box and magically works for the millions of hits it gets per hour.
vaibhav1800 6-Dec-18 3:19am
Lets Imagine you are giving an interview for Ebay and An Interviewer asks the same question like How you maintain the scalability ? What concepts do you include in short here to convince the interviewer ? Need those concepts buddy :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web05 | 2.8.190306.1 | Last Updated 2 Dec 2018
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100