-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Epic: Latency #3548
Comments
#3458 can be quite helpful in investigating this |
I've tried to set up local test without any Cloudflare/Vercel things using browser. Build proxy:
Generate self-signed certs:
Start proxy with
Now I've used the following js file: import { Client, neonConfig } from '@neondatabase/serverless';
async function whatsTheTimeMrPostgres() {
neonConfig.wsProxy = (host, _port) => host + ':7500/v2';
neonConfig.pipelineConnect = true;
neonConfig.pipelineTLS = true;
neonConfig.coalesceWrites = true;
const client = new Client('postgres://stas:stas@asdf.localtest.me:7500/postgres');
await client.connect();
const { rows: [{ now }] } = await client.query('select now();');
await client.end();
console.log('The postgres time is: ', now)
return now;
}
(async () => {
await whatsTheTimeMrPostgres();
})(); Bundled it with
And started in a browser by using the following html file:
Now browser gives the following:
And proxy prints smth like:
With or without pipelining I see ~300ms delay between |
Motivation
To reduce latency between end-user and the proxy
DoD
TODO
Discussion
Tasks
The text was updated successfully, but these errors were encountered: