Уровень 0 · материалов: 3
В кластер входят документы об оптимизации и поддержании активных сетевых соединений, но не входят инструкции по работе с конкретными расширениями БД или локальным кэшированием ресурсов.
Общие признаки: повторное использование соединений, снижение накладных расходов на установку связи, повышение производительности передачи данных, механизмы keep-alive
Группа выше: TCP, HTTP и транспортные протоколы
Смысл: The main idea is that developers often waste significant system resources and time by recreating TCP connections for every HTTP request instead of using persistent connections (keep-alive), and implementing this simple change can lead to massive performance gains.
Developers should use persistent HTTP keep-alive connections via connection pooling to avoid the high latency of repeated TCP/SSL handshakes.
Смысл: The main idea is that traditional TCP keepalives are insufficient for modern microservices due to network intermediaries (proxies), and developers should utilize L7 mechanisms like HTTP/2 PINGs and gRPC keepalive policies to ensure reliable service discovery and connection health.
Modern microservices should use L7 keepalive mechanisms (like HTTP/2 PING) instead of L4 TCP keepalives to accurately detect destination server health through proxies.
Смысл: The author investigates whether the performance benefits of prepared statements (preparing once, executing many times) can be achieved across multiple PHP script executions using persistent connections. While initially concluding it's impractical due to connection cleaning, the author discovers a configuration option that allows the technique to work.
The author tests if persistent connections can allow prepared statements to be reused across different PHP requests, finding it technically possible but ideologically discouraged.