0

I have a website run by php. I have about 80 users that will be signing up within a hour period.

my question is are there any problems that could occur when having lots of people accessing my database all at once?

I mean 80 users is a lot for me, and if some of you people that have way more than that are laughing at me, how many people would it take to mess up a database?

Thanks in advance!

krummens
  • 837
  • 2
  • 17
  • 38
  • 1
    It all depends on the speeds of your hardware and what your code does, but 80 users in an hour is nothing. Any system should be able to cope with that. – KIKO Software Feb 13 '15 at 23:07
  • It depends on the hardware, but 80 is not much, even a relatively slow (P4, 512MB RAM) server would be enough (or your laptop). Also, What do you do in the code? If we are talking about 1000+ inserts for a single user, than it could be problematic. – szab.kel Feb 13 '15 at 23:08
  • Just logging in? No. It depends on how much you're pulling from the database per request. If you're pulling thousands of records per request or something, maybe. – developerwjk Feb 13 '15 at 23:09
  • so the users are creating accounts and the php inserts one row of 7 columns into my database – krummens Feb 13 '15 at 23:10
  • Shouldn't worry about it. If You didn't make a critical mistake in the code to affect performance, you shouldn't have any problems. – szab.kel Feb 13 '15 at 23:12
  • OK. Thanks! thats a relief – krummens Feb 13 '15 at 23:13
  • 1
    You can determine these things yourself, approximately. Fire up a tool like Apache Bench and see how long it takes to display a page - make sure you are on a reasonably fast connection. On a simple VPS, a well-written PHP page will take fractions of a second to process (the request/response time, and the loading of CSS/JS/images are additional, but are not much more). You can simulate a certain number of users simultaneously too. That said, your load is very light - 80 users per hour is just over one per minute on average, which any server will be fine with. – halfer Feb 13 '15 at 23:21
  • 1
    thanks @halfer. that helps a lot. i didn't know I could use Apache Bench – krummens Feb 13 '15 at 23:22

1 Answers1

0

You could use a tool like apachebench to check. Then you could use tools like memcached (or memcachedb if you needed persistence) to dial down the mysql queries. I would also set up mysql slow query logging.

joeldg
  • 50
  • 3