Skip to content

Prefetch frames during handshake#1317

Merged
haaawk merged 3 commits intomainfrom
parallel_hello_and_next_frames
Apr 17, 2024
Merged

Prefetch frames during handshake#1317
haaawk merged 3 commits intomainfrom
parallel_hello_and_next_frames

Conversation

@haaawk
Copy link
Collaborator

@haaawk haaawk commented Apr 15, 2024

When the client already has a session token we can try to prefetch next_frames during handshake.

For a replica in Sydney and primary in US it cuts the sync time from 400ms to 200ms.

@haaawk haaawk force-pushed the parallel_hello_and_next_frames branch from 4f80864 to ae3757b Compare April 15, 2024 09:30
@penberg
Copy link
Collaborator

penberg commented Apr 15, 2024

@haaawk Wouldn't extending the protocol to only require one message for this use case be more maintainable? That is, make it possible to only send a LogOffset message for sync?

@haaawk
Copy link
Collaborator Author

haaawk commented Apr 15, 2024

@haaawk Wouldn't extending the protocol to only require one message for this use case be more maintainable? That is, make it possible to only send a LogOffset message for sync?

It would but this way we can give users improvement without forcing them to update their production dbs. We should work on extending the protocol to allow only a single message but in the meantime I have this to give users improvement straight away.

@haaawk haaawk force-pushed the parallel_hello_and_next_frames branch 4 times, most recently from b0e5a79 to 7a2e46c Compare April 16, 2024 18:00
@haaawk haaawk changed the title Parallel hello and next frames Prefetch frames during handshake Apr 16, 2024
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
@haaawk haaawk force-pushed the parallel_hello_and_next_frames branch from 7a2e46c to 3cc2303 Compare April 17, 2024 08:01
@haaawk haaawk requested a review from LucioFranco April 17, 2024 08:01
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
@haaawk haaawk force-pushed the parallel_hello_and_next_frames branch from 3cc2303 to 3f51bc7 Compare April 17, 2024 08:18
@MarinPostma MarinPostma force-pushed the parallel_hello_and_next_frames branch from c998372 to 311accd Compare April 17, 2024 08:33
@haaawk haaawk dismissed LucioFranco’s stale review April 17, 2024 08:47

Marin removed the secondary client

@haaawk haaawk added this pull request to the merge queue Apr 17, 2024
Merged via the queue into main with commit 65a8bfb Apr 17, 2024
@haaawk haaawk deleted the parallel_hello_and_next_frames branch April 17, 2024 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants