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

Connection persistence and container ID tracking in Redis #5

Closed
karashiiro opened this issue Sep 17, 2021 · 6 comments
Closed

Connection persistence and container ID tracking in Redis #5

karashiiro opened this issue Sep 17, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@karashiiro
Copy link
Owner

If the lobby server goes down for some reason, connections should not be dropped when the server is restarted. The game instances behind the lobby server will still be running, so no game state will be lost. All that needs to be done to restore connections is to persist the connection map into a database of some kind.

@karashiiro karashiiro added the enhancement New feature or request label Sep 17, 2021
@karashiiro
Copy link
Owner Author

karashiiro commented Sep 18, 2021

While we're at it, we should persist the connection IDs so we can stop closed containers with no players.

@karashiiro
Copy link
Owner Author

While we could leave empty containers running to reduce startup times, that would also prevent us from reloading addons without restarting the entire setup.

@karashiiro karashiiro changed the title Connection persistence Connection persistence and container tracking Sep 18, 2021
@karashiiro
Copy link
Owner Author

Redis should be configured with RDB+AOF because we don't want any data loss to happen at all. Connections can be opened and closed within a few minutes, and we don't want recent joiners to not have their connections restored.

@karashiiro karashiiro changed the title Connection persistence and container tracking Connection persistence and container ID tracking in Redis Sep 20, 2021
@karashiiro
Copy link
Owner Author

One half of this is done 29054ea, now the actual connections need to be persisted.

@karashiiro
Copy link
Owner Author

9e20406

The container connection is now persisted, so that complete rejoining can occur; in-game reconnection is next.

@karashiiro
Copy link
Owner Author

32582be closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant