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
This seems to indicate latency sensitivity in the measured process / API endpoints.
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).

Asked by Justin Lowen
(68 rep)
Apr 22, 2024, 05:40 PM
Last activity: Apr 24, 2024, 05:30 AM
Last activity: Apr 24, 2024, 05:30 AM