Skip to content
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

Add postgres adapter for socket.io #5057

Closed
wants to merge 11 commits into from
Closed

Conversation

rbren
Copy link
Collaborator

@rbren rbren commented Nov 15, 2024


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:dbda7bc-nikolaik   --name openhands-app-dbda7bc   docker.all-hands.dev/all-hands-ai/openhands:dbda7bc

@rbren rbren changed the title Add postgres adapter Add postgres adapter for socket.io Nov 15, 2024
@diwu-sf
Copy link
Contributor

diwu-sf commented Nov 18, 2024

Hi, would you also be willing to add in the socket.io redis adapter?
Postgres NOTIFY / LISTEN doesn't really scale when PGBouncer / any kind connection pooling is used in between the app server and the postgres. Having all app servers direct connect to postgres is also an anti-pattern for scaling due to postgres' process-per-client architecture.

Redis would be a more usable pub-sub infra, and in our stack, we use Redis already with dramatiq for background async tasks

@rbren rbren closed this Nov 19, 2024
@rbren
Copy link
Collaborator Author

rbren commented Nov 19, 2024

@diwu-sf we are switching to postgres!

@rbren
Copy link
Collaborator Author

rbren commented Nov 19, 2024

err...we are switching to redis!

@diwu-sf
Copy link
Contributor

diwu-sf commented Nov 19, 2024

Okay great, make a lot more sense for scaling.

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.

2 participants