DEV Community

Discussion on: The case for performance (Part 1)

Collapse
 
darkain profile image
Vincent Milum Jr

There are a number of metrics that I put into place with my environments to help monitor performance.

First, nginx configuration:

add_header X-Request-Time '$request_time';

This will add an additional header to every page request detailing how long it took to process the request. My particular framework (Altaform) can generally render pages in ~10ms time, unless there are very large and complex SQL queries. Luckily, the framework itself benchmarks those queries and will report them out to me as well.

My primary web browser is Opera. The browser has a built in VPN service. Enabling this, I can with a simple click in the address bar, switch with VPN region I'm connecting through, essentially simulating a global hop between end-points. The browser has several regions available, so this has been great to do global network latency testing.

Another thing I do sometimes is pay the $8 or whatever for wifi while flying, with the only reason being that I want to test my web sites through it. Airplanes have terrible internet connections usually, with countless passengers all sharing a single high latency satellite connection.

Lastly, depending on cell phone, you can manually set what cell generation to connect through. Many Android phones still have the option to force 3G or 2G (Edge) connectivity. This is another great way to test network latency and bandwidth with a web application.