Sample Header Ad - 728x90

PostgreSQL & SQLAlchemy: Minimizing Impacts of latency with chatty applications

0 votes
1 answer
108 views
Are there any ways to minimize the impact of latency between the application and database when running PostgreSQL & SQLAlchemy ORM? Changing loading strategies or preloading properties has been effective - just generally reducing the number of statements between app & database. Are there any other techniques that can be used to minimize the impact of that connection overhead? In the below Grafana graphs, I simulated 10ms latency between application and database using the tc traffic control module. At the midway point, I removed this artificial latency resulting in about 300 microsecond latency when timing SELECT 1; between the application and database (localhost loopback interface - database inside the same container as the application). Grafana graph - 10ms latency vs 300μs latency b/w app & db This seems to indicate latency sensitivity in the measured process / API endpoints.
Asked by Justin Lowen (68 rep)
Apr 22, 2024, 05:40 PM
Last activity: Apr 24, 2024, 05:30 AM