1

I have a scenario where more than 100k users trying to update database concurrently through web application in struts ,hibernate . what is the best way to solve this.

This application is locally accessed within india bangalore.this site does not always have traffic,but only during sep to dec.

around 5k users hit the database.

we have two servers

Dead Programmer
  • 12,427
  • 23
  • 80
  • 112
  • 2
    100k *concurrent* users would put your website in top 1000 busiest sites on the web, I should think. – Seth Sep 03 '10 at 07:21
  • Can you say a little more about the problems you are experiencing? – Jaydee Sep 03 '10 at 07:21
  • I am showing users a list of data on stock price in a table format ,which is editable and saved. so users who try to hit this table should view consistent data. – Dead Programmer Sep 03 '10 at 07:25
  • 2
    100k simultaneous requests/second puts you up there with G, FB, Y!, MSFT etc... While you may have 100K running "sessions", how many are truely touching the database simultaneously. User think-time to read a page is much longer than the server think time to generate a page. – stephbu Sep 03 '10 at 07:37
  • 1
    100k, 10k or 5k Which is it? Please define your question with more precission – mR_fr0g Sep 03 '10 at 10:14
  • @mR_fr0g around 5k people hit the table concurrently – Dead Programmer Sep 06 '10 at 05:59

3 Answers3

3

Farm it off to Amazon EC2 and S3. You are not ready (really). Once you are, the transition will be pretty simple. Look into OpenStack for when you want to tackle the challenge.

GalacticJello
  • 11,235
  • 2
  • 25
  • 35
  • 2
    Do you have experiences with OpenStack to share? – Thorbjørn Ravn Andersen Sep 03 '10 at 09:12
  • It's basically a repackaging of the Rackspace APIs, but with the support of Nasa, Dell, Citrix, etc. Cloud is where it is "at", especially in terms of the OP's current predicament. Amazon will get you pretty far, but you will come to a point where it makes sense to host the hardware yourself and enjoy the economies of scale and increased flexibility. Another nice thing about OpenStack is that it is Apache 2.0, and not just "open core". Keep a watch on it for the next few months. It's a game-changer. – GalacticJello Sep 04 '10 at 02:12
2

I think you better make your application distributed.You can use Hadoop which is Opensource.If your not intending to make it distributed then to speed up your database you can try In-memory-db.

UPDATE:

I just saw an db implementation of apache for online transactions.So I'm just Posting the links in case you may need it. Apache Derby[Wiki,Related Question In SO]

Community
  • 1
  • 1
Emil
  • 13,577
  • 18
  • 69
  • 108
0

You could put all concurrent requests to the persistent queue with JMS oslt and then process them in on one (or more) thread (or server) by pulling and processing request one by one.

Žygimantas
  • 725
  • 3
  • 7
  • 13