Front-end API now up to twice as fastBlog

Preflight responses now generated at the edge

post-thumb

BY Urtho / ON May 03, 2022

We hate front-end latency

So we went ahead and slashed the front-end query latencies by half (sort of).

Most front-end queries to Algorand API generate an extra preflight query - essentially making two HTTPS request for every API call. This is almost not noticeable for those close to an AlgoNode region but if you are 350ms away from the server this makes for 700ms (at minimum) delay.

The main reason for the extra preflight queries is the extra header passed to the request by the SDK. Browser security rules require an OPTIONS query to verify CORS before every requests that contains a non-standard header.

Starting today OPTIONS (preflight) queries are handled at the edge in over 200 locations.
This results in latencies around 20ms in all geographies.

That is what you call a quick win!

Share: