Vercel Functions + Database Latency

Observe the latency querying different data services from varying compute locations using the edge and node runtimes of Vercel Functions. We built this playground to demonstrate different data access patterns and how they can impact latency through sequential data requests (i.e. waterfalls).

Learn more about Vercel Functions or deploy a template.

Data service

Location

Vercel Functions run in Edge or Node runtimes. In Edge runtimes, multiple regions are supported (by default they're global, but it's possible to express a region preference via the region setting).

Waterfall

Executing complex API routes globally can be slow when the database is single-region, due to having multiple roundtrips to a single server that's distant from the user.

Samples

The number of samples to run for each location. A larger number of samples provides a clearer pattern of the average latency.