This demo tries to simulate real-world usage of a cace in front on a Neon endpoint. The browser calls a Cloudflare worker that creates a TCP connection to either an endpoint or a cache, executes one query then closes the TCP connection. It's "naive" and doesn't use the serverless driver.
Queries returned by endpoint = Browser -> Cloudflare Worker -> Neon Endpoint.
Queries returned by cache = Browser -> Cloudflare Worker -> Cache -> Neon Endpoint.
There are three different SQL queries. The first two should run quickly, so mainly show the advantage of having a global cache. The third query simulates a long-running query.