Giter Club home page Giter Club logo

edge-data-latency's Introduction

Vercel Functions Database Latency

This demo helps observe the latency characteristics of querying different popular data services from Vercel Functions.

https://db-latency.vercel.app

Providers

Here is an overview of all data service providers and the compute locations available in this app:

Provider Edge (Global) Edge (Regional / US East) Node
Convex (SDK)
Fauna
Grafbase (GraphQL)
Neon w/ @neondatabase/serverless
Neon w/ Drizzle ORM
Neon w/ Prisma ORM
PlanetScale w/ Kysely
PlanetScale w/ Prisma ORM
PlanetScale w/ Drizzle
PolyScale
Shopify (Storefront GraphQL API)
Supabase w/ supabase-js
Supabase w/ Prisma ORM
Supabase w/ Drizzle
TiDB Cloud (serverless-js)
Tigris
Turso
Turso w/ Prisma ORM
Turso w/ Drizzle
Upstash (SDK)
Xata w/ TypeScript SDK
Xata w/ Prisma ORM
Xata w/ Drizzle

Testing Methodology

  1. Smallest atomic unit, e.g. 1 item / row.
  2. Data schema:
interface EmployeeTable {
  emp_no: number;
  first_name: string;
  last_name: string;
}

edge-data-latency's People

Contributors

cahidarda avatar chronark avatar evanshortiss avatar fbjork avatar haaawk avatar ianmacartney avatar jawj avatar kelvich avatar leerob avatar mitrotasios avatar nikolasburk avatar notrab avatar ovaistariq avatar preslavle avatar rauchg avatar samaybar avatar sferadev avatar shadid12 avatar shiyuhang0 avatar steven-tey avatar thorwebdev avatar tywayne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

edge-data-latency's Issues

Supabase w/ Prisma ORM & Drizzle sometimes fails with 500 errors

The Supabase-based tests using Prisma ORM and Drizzle sometimes seem to fail with a 500 error.

The corresponding API route are api/supabase-prisma-node and api/supabase-drizzle-node.

When it breaks, this is the output in the browser console:

image

In these cases, the rendered chart areas stay empty.

@leerob would you be able to take a look at the logs for the above routes and see if there are any errors related to the Supabase DB or some other thing?

Supabase result is misleading (data returned is null from db)

When testing from Asia (Thailand) Supabase gave 100ms latency for global edge function and it seems too good to be true (afaik supabase db is in the US). Upon debugging, I discovered the data returned from the DB is null. I inspected it from the browser console log.

image

screenshot 2023-12-09 at 14 35 52@2x

I compared it with another Postgres provider, neon tech, and it gave 3.5sec latency and the data was returned.

screenshot 2023-12-09 at 14 39 31@2x

Add Cloudflare D1

D1 is pretty similar to Turso in terms of infrastructure, which I would like to see how they compare to each other.

Add no. of request selector & display average

There could be an input or a slider to select no. of requests to be made for testing
And after all the requests are made, we could show the average of all.

I'd be happy to open a PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.