<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/quicker-serverless-postgres-connections-3oeos9or2" -->

---
title: Quicker serverless Postgres connections | daily.dev
description: Neon's serverless driver connects to PostgreSQL over WebSockets, but serverless environments require a fresh connection per request, making connection latency...
canonical: https://daily.dev/posts/quicker-serverless-postgres-connections-3oeos9or2
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Quicker serverless Postgres connections | daily.dev
og:description: Neon's serverless driver connects to PostgreSQL over WebSockets, but serverless environments require a fresh connection per request, making connection latency...
og:url: https://daily.dev/posts/quicker-serverless-postgres-connections-3oeos9or2
og:image: https://api.daily.dev/og/posts/3oEOS9Or2.png
og:image:alt: Quicker serverless Postgres connections
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quicker serverless Postgres connections

**[Neon](https://daily.dev/sources/neontech)** · 10 min read · 0 upvotes · 0 comments

## Summary

Neon's serverless driver connects to PostgreSQL over WebSockets, but serverless environments require a fresh connection per request, making connection latency critical. Starting from a baseline of 9 network round-trips, Neon reduced this to 4 through several optimizations: upgrading to TLS 1.3 (saves 1 round-trip), eliminating the SSLRequest round-trip by moving encryption to the WebSocket layer, replacing SCRAM-SHA-256 authentication with simple password auth (saves 1 round-trip and avoids CPU budget issues on platforms like Cloudflare Workers), and pipelining the Postgres startup/auth/query messages together (saves 2 round-trips). An additional fix for Nagle's algorithm via TCP_NODELAY was needed to prevent pipelining from causing delays on short-distance connections. Future improvements may come from WebSockets over QUIC (HTTP/3) or WebTransport, which could reduce the count to 3 or even 2 round-trips.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://neon.com/blog/quicker-serverless-postgres>

## Similar posts on daily.dev

- [Neon now has realtime](https://daily.dev/posts/neon-now-has-realtime-1it5fsgca) · Neon · 7 upvotes · 0 comments
- [Query Pipelining in node-postgres: 2-3x More Throughput](https://daily.dev/posts/query-pipelining-in-node-postgres-2-3x-more-throughput-qhf46mieb) · Platformatic · 0 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#postgresql](https://daily.dev/tags/postgresql), [#serverless](https://daily.dev/tags/serverless), [#webdev](https://daily.dev/tags/webdev)

[View this post on daily.dev](https://daily.dev/posts/quicker-serverless-postgres-connections-3oeos9or2)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Quicker serverless Postgres connections","url":"https://daily.dev/posts/quicker-serverless-postgres-connections-3oeos9or2","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/quicker-serverless-postgres-connections-3oeos9or2"},"datePublished":"2026-07-09T06:57:36.265Z","dateModified":"2026-10-14T02:31:01.812Z","description":"Neon's serverless driver connects to PostgreSQL over WebSockets, but serverless environments require a fresh connection per request, making connection latency...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a4ebdced500ae5b70cbcd59cc855bba6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a4ebdced500ae5b70cbcd59cc855bba6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Neon","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Neon","logo":"https://media.daily.dev/image/upload/s--65EDghou--/f_auto/v1724339118/logos/neontech","url":"https://daily.dev/sources/neontech"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/quicker-serverless-postgres-connections-3oeos9or2","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"database,postgresql,serverless,webdev","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Neon","item":"https://daily.dev/sources/neontech"},{"@type":"ListItem","position":3,"name":"Quicker serverless Postgres connections"}]}
```

