Um dos temas eternos é o correto trabalho com o cache. Parece simples, mas, na verdade, tem muitas armadilhas e recursos. Bem, quando a carga chega, tudo se torna ainda mais interessante. Não há "bala de prata" no armazenamento em cache, mas um conjunto de técnicas testadas e comprovadas. E tudo o que resta é escolher uma combinação deles para sua tarefa, aproveitando as vantagens e nivelando as desvantagens.
Na conferência PHP Rússia 2021 , Pavel Parshikov, engenheiro de back-end em Avito, apresentará um relatório “Vamos armazenar em cache em sistemas de alta carga”. E nesta entrevista, falamos sobre se o PHP é bom para aumentar projetos em termos de carga e quais ferramentas são melhores para usar.
Diz-me algo sobre ti. O que vocĂŞ faz?
Trabalho como engenheiro em Avito. Há mais de 15 anos desenvolvo web, principalmente 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. , .