We go to the cache in high-loaded systems

One of the eternal topics is the correct work with the cache. It sounds simple, but in fact, it has a lot of pitfalls and features. Well, when the load comes, everything becomes even more interesting. There is no "silver bullet" in caching, but a set of proven techniques. And all that remains is to choose a combination of them for your task, using the advantages and leveling the disadvantages.





At the PHP Russia 2021 conference, Pavel Parshikov, backend engineer in Avito, will present a report β€œWe are going to the cache in high-loaded systems”. And in this interview, we talked about whether PHP is good for growing projects in terms of load, and which tools are better to use.





Tell me something about yourself. What do you do?





I work as an engineer in Avito. For over 15 years I have been doing web development, mainly backend design. 





, , . - , , . . . , , , , .





. ? ?





. , , . . , , . . . : , , . 





. - . 





. - , .. , . , β€” . 





, , .





. , . . , . .





, . , , I- (, Mail.ru ..), , Google Apple. , , , , .





PHP ?





, PHP, . , , PHP. , , RPS, .





. β€” PHP Go. PHP . PHP, , API (mapi).





PHP . PHP- , . , , - PHP, , PHP. , β€” highload, - -, , CS'. PHP- , . , , , .





, , PHP . benchmark' . JIT . PHP , . , PHP- , -: , .. .. PHP , . - . .





, , PHP . . . , , , , .. β€” . , N - . N . 





, , , . PHP . , PHP : event loop, promises, coroutines. , ReactPHP, AMPHP, Swoole. 





HTTP - . PHP curl_multi_exec(), HTTP . Guzzle, .





PHP . , . highload- , .. . , . , DependencyInjection Symfony. 





, API. , , . , , . , PHP7.4 preloading . RoadRunner, .





, PHP - -. , , .. , , , Javascript. PHP , , . PHP , , , time to market .





, ? ? , β€” ?





, highload- , . β€” . , , , . , PHP Russia, β€” . , . 





, . , . , , , (loose coupling). «» . 





, SOLID, . β€” (DI). , , , . , . (DIC), .





, loose coupling , , by design. API. , API. - , . 





, PHP , β€” stateless . β€” «» β€” , - PHP . , . , . , .





, , , . , , , - , , . , time to market. 





, , , . highload, . , MVP-, , . highload- β€” - : , bottleneck, .





highload, , . , , . , , . . β€” , , . .





, , , . , , Β« Β», . PHP, , . , zval, Β« Β» . , . , . 





, . . . , , . , . , , .





, , . , . - , . observability : , , . «» . , . 





, . 





SRE, . . - . 





PHP Russia?





β€” , , , . ? PSR' Simple Cache , get, set, delete .. 





, , β€” , . , , . , - - : , , .. , -. , . -, PHP- β€” . 





. . , . , , . β€” . , , . , , () , , .





, . , , . ,   . . Highload- , , : , , .. , , , . 





- , Redis Memcached. , , . , RPS , Memcache PHP, get/set/delete/increment/add. 99% . . .  , ,   .





. , , . - - . , , . β€” , PHP-! 





highload- . . . , -. , , , . 





PHP , . .





, β€” ?





, β€” . - .





, response time, , . , β€” , , . , . , .





: β€” , β€” , β€” . , . , ? : , , . , ? 





, , β€” ( ) ( ). -, :  , . . , . HTTP. , , - .





. , . β€” , , , . 





, . , PHP-, . , , . , ,   . , , !





. , «» . , , . 





, , , Β« Β» .





PHP Russia 2021  28   , Radisson Slavyanskaya.     , .





: .     !








All Articles