High-load project in PHP


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
10 views
Good time of day. Tell me that you need to consider what pieces to add to the project that would withstand a large flow of visitors or advise the literature on this topic.
PS: the Project is likely to be implemented on the Zend Framework.
by | 10 views

7 Answers

0 like 0 dislike
    \r
  • More cache
  • \r
  • When contacting the page should be the minimum number of queries to the database, but it is better without them
  • \r
  • Use the RAM to the max, at the time, the translation of some items in a project from MySQL to memcache has given a big boost
  • \r
  • Think carefully about the architecture of servers and communication servers among themselves for greater scalability
  • \r
  • Abandon Apache in favor of bundles Nginx+php-fpm
  • \r
by
0 like 0 dislike
you better define hilog or Zend framework.
and most importantly don't listen to anyone who wants to give advice with such a small input. hiladi are different and bottle places can be in different places.
by the way, the developers Holodov hold seminars spb-borodin.livejournal.com/596.htmlthere are plenty of articles on the topic, read as much as possible, to see the difference and understand what you need for your project.
and better to make the website as usual, if you go, you will find difficult passages and rewrite. still without experience immediately the right architecture to design will not work.
by
0 like 0 dislike
in addition to the above:
1. if SEO allows, try a little more to do on the client side (javascript templates/ajax/...) and less on the server
\r
2. do not skimp on code development-cluster management (and to discongruity projects cluster needs at least for reliability): the update scripts (and in the project it is necessary to consider that the code and data can be updated), a backup and restore from a backup, managing cluster adding/removing/adjusting the nodes, etc.
Just when the poor organization of highload projects buggy more often :) because the corny 'testers' anymore.
\r
3. do not chase technology, it is not necessary to pile up frameworks, plugins and libraries to each other, to be always useful, and maybe your bike in some places can be preferable (I'm not talking about cases where almost the whole problem in its entirety is solved already something ready, always there are nuances)
\r
4. optimizing sql is cool, but very often, nosql solutions (+something for serialization) quite a substitute for sql (and speed of course win) as combined solutions (but the latter generates slightly more problems with updates to design and code)
* memcached is way too nosql, not only is the repository (not guaranteed if data is retained, they can be removed)
* here is the storage solution should not the city own bikes and it is not necessary to invent a nightmare on files. BUT, for example, a small static (redkozemelnye) pieces of the database is much more efficient to load right into a PHP array (up to hundreds KB of php code initialisatie variables is significantly faster than any database framework, not to mention the overhead of database connections, etc.)
\r
P. S. get ready to rewrite everything, it is important for developing projects, i.e. using complex but the finished products is realized that working on what biznesowych driven around, then, when this monster becomes simply unwieldy, based on ready-made, from scratch, a new project is implemented, no sores growth, fast and easy.
by
0 like 0 dislike
About the literature, because the database, in most cases — a weak spot, I highly recommend the book
MySQL. Performance optimization, 2nd edition from Peter Zaitsev and others.
by
0 like 0 dislike
of additional use:
— eAccelerator (if, however Apache still is)
— put a bunch of mysql master — master for scalability, the recording requests can be made on any of the servers, and neskolko slaves to read.(this is more than the cash option)
by
0 like 0 dislike
keep a couple hilolov, see all from the admin.
\r
The trouble is that plugging to the database in two queries. today it is mysql, and we must be prepared if "shoot" to go to something like Postgres.
\r
hence, it is necessary to drip in side caching cheekbones queries in memcached or the like.
the second thing I am concerned is the generation of content and opyatzhe storing it in memcached. besides the fact that it is already stored in the eA.
\r
Opera is easier to build than the percent.
by
0 like 0 dislike
projects from high load are not. usually all implemented in a short time, then the project is launched, bugs are corrected, the load gradually increases, there comes a realization that a server will soon begin sadyatsya, determined the weak point, it is optimized each time it becomes more difficult to optimize, that is more expensive than the purchase / upgrade of iron, arraydim, buy. I wish the default to achieve good load of his project.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
4 answers
asked Mar 29, 2019 by max_mara
0 like 0 dislike
7 answers
0 like 0 dislike
6 answers
asked Mar 22, 2019 by Mirgorod
110,608 questions
257,186 answers
0 comments
27,914 users