Giter Club home page Giter Club logo

function-database-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;
}

function-database-latency's People

Contributors

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

Stargazers

Rod Sot avatar  avatar horlar avatar Eugenio Campos avatar  avatar  Vivek Rp avatar Sinchan Dasgupta avatar nick avatar David Hilman avatar Dmytro Pushkarchuk avatar Joost Jansky avatar Lars-Erik Roald avatar DevMirza avatar Niranjan Anandkumar avatar Cullen avatar Cory Tyburski avatar Andrew avatar Magoz avatar  avatar  avatar te avatar  avatar paul avatar Porter avatar  avatar Josh Habdas avatar Mattèo Gauthier avatar Ozan avatar  avatar Tu Nguyen avatar Daniel H. avatar Vincent avatar Junglei Kim avatar Tuan Duc Tran avatar Bruno Gomes avatar José Duarte Alleuy avatar Mini256 avatar v1rtl avatar Adrien KISSIE avatar roll avatar  avatar U.M Andrew avatar Dominic Nguyen avatar Ramiro Nuñez Dosio avatar Dexter Marks-Barber avatar Jahidul Islam avatar George Kontridze avatar  avatar William Villeneuve avatar Liumy avatar illdephyn3d avatar Jeff Carpenter avatar Oumar Barry avatar Julio Marquez avatar Ivan Pegashev avatar isaced avatar Gabriel Trzimajewski avatar Kajendran Alagaratnam avatar  avatar Artur Dudek avatar feathers avatar  avatar Linus Hellberg avatar  avatar Lukas Krüdewagen avatar Adaptive Shield Matrix avatar Guilherme Decampo avatar Luis Rojas avatar Allyedge avatar wei-wei avatar Shawki Sukkar avatar Alex MacCaw avatar bai avatar Brian Kim avatar Lance Harper avatar Kyle Taylor avatar  avatar Seren_Modz 21 avatar Justin Hess avatar Abhishek Mishra avatar Hyeseong Kim avatar Zaiman Noris avatar Ivo Ilić avatar Sebastian avatar Marek Sokol avatar Joe Timmons avatar Çağatay Karahan avatar Kristóf Poduszló avatar Noah V avatar Oscar Beaumont avatar Pekka Enberg avatar Oğuzhan Olguncu avatar Arsen Zairov avatar Gabe Duarte avatar Pranav avatar Sandalots avatar Alex Lane avatar Paul Nodet avatar Pham Minh Hieu avatar  avatar

Watchers

Alex MacCaw avatar  avatar  avatar te avatar  avatar Kostas Georgiou avatar  avatar Shun Kakinoki avatar

function-database-latency's Issues

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

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?

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.

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.

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.