-3

I am new for php development, currently I am working on a website which is a social networking site and having more than 5000 members. Website has built in Dolphin-Boonex PHP.

However website is running smooth with no problem. But I am afraid after 5 years if million of users hit at the same time, then what will happen? Will it breakdown. How to overcome with this problem. How does facebook manage load on server as every minute it has millions of hit at a time.

Please help me with your ideas, any help link. What programming methodology should use to get this? How should database manage?

Thanks,

webfreaks
  • 55
  • 1
  • 7
  • 1
    You scale when you need to scale, but well structured code makes this easier - but millions of hits per second is pretty unlikely unless you do grow to be facebook or google... and they don't run on 1 server – Mark Baker May 04 '13 at 11:33
  • 1
    When you'll hit millions of users, you'll have the resources to deal with that. – Damien Pirsy May 04 '13 at 11:34
  • Thanks Mark for quick reply... So I need to restrict server to carry a limited load and have to distribute server – webfreaks May 04 '13 at 11:40
  • You write your code to support distributed sessions (or sticky sessions), allow easy plugin of caching, distributed databases, etc even when you're running everything on one box; that way it's easier to add a second load-balanced webheads when you need it, or separate your db server onto a separate box, etc... a lot of it comes down to designing layered software – Mark Baker May 04 '13 at 11:58

1 Answers1

0

This is not as much as a php question as is an operating systems question. To serve one million users you could use linux virtual server which load balances your traffic between several machine or consider a cloud service.

But as Mark Baker suggested, is quite unlikely you will have to deal with so many requests.

Catalin
  • 112
  • 1
  • 13