开发者

Today's best approaches on scalable high-performance PHP-applications [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

We are in the startup build phase of a new PHP webapp that will be placed onto a cloud server to allow fast and easy up/downscaling when customers will grow or decrease in numbers. Most probably, we will use a PHP f开发者_运维问答ramework (Codeigniter) to keep development speed high.

Our next step is to implement features for increased performance (cacheing etc) and choosing which databases to use.

Solutions like memcached and eaccelerator is of course what comes up into our minds at first, but are there even better solutions available out there today?

Is mySQL really yesterdays choice when high performance is in focus?

So, please - share your ideas and thoughts on how to create the basic cornerstones for a high performance webapp!

Thanks!


Two things you should know:

  1. 8 or 9 out of 10 startups fail; and
  2. Nothing exceptional is required to get you to 1-5 million uniques a month. If and when you get to 5+ million uniques ou will probably have rewritten your application 2-6 times.

So basically don't worry about this "problem" until you have a problem.

Also cloud servers are good for burst usage but the data fees tend to make them a bad choice for constant usage. The typical progression is:

  1. Shared hosting (you may skip this);
  2. VPS (you might skip this too);
  3. Dedicated server; then
  4. Co-location.

As for what tools to use, well that depends entirely on your app. MySQL is a fine choice for most circumstances. An opcode cache like APC or eAccelerator is typically a good idea. Memcache can be useful for certain kinds of applications.


I think you should focus on building a good app, and worry about performance once you have a big enough user base that it matters. That isn't to say you should code without performance in mind. However it sounds like you're trying to optimize before you even have any real users. Any performance tuning you do would be theoretical, and not based on what actually happens with your particular application. You'll have to have a lot of users before you can see the usage patterns and the bottle necks that result specifically in your application. Also, if you're really worried that much about performance at this level, using PHP is not the way to go. PHP can be made fast, but compared to other languages which are compiled, it will always be slower. There is no answer. It all depends on what your application is doing. PHP can work fine if most of the server time is spent somewhere else like in the database. MySQL can be fine depending on what you're doing, and what kind of information you are trying to use it for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜