-
Notifications
You must be signed in to change notification settings - Fork 3
redirect #2
Comments
👍 |
Why not just have single server that can stop listening on its tcp socket on an IPC signal? We can use http for live replay upload as well. It can run happily until all its tasks are finished. |
all replay listeners must connect to the process to which the replay writers actually write. |
Livereplay server should buffer the replays into a file anyway... We can just have a livereplay viewing be a simple http service that streams the replay out of the file. |
you cant use a http server - the file would be growing as it is being uploaded. |
HTTP is not bloat. File is cached in kernel if it is being used. There is no I/O overhead in reading a file from memory. A stock HTTP server would actually be able to stream replay files as they are being written to the filesystem (assuming the kernel is not windows and doesn't throw EOF for no reason). This unifies the access to replays across livereply and replay download as well. |
redirect -> no I/O necessary. no synchronization across process boundaries necessary. |
redirect -> Hold everything in memory because bob is not streaming his part fast enough. Massive synchronization in the same process |
Scratch that, you have to hold everything in memory due to new clients getting the stream. (In redirect method) |
Using http we get handling of slow clients for free as well, since good reverse proxies like nginx handle this pretty well. |
we dont need to change the lobby. |
this is a feature suggestion.
there should be 3 ports allocated to the livereplay service as a whole.
2 instances running at the same time should be supported.
the primary server listens on the primary port and one of the secondary ports.
when the service needs to be restarted, the primary will stop listening on the primary port
and a new primary will be started listening on 2 ports.
any request coming into the new primary will be redirected to the now secondary if
the replay id references a replay that is still being handled by the old primary server.
this allows the server to be restarted at any time without interrupting active connections.
The text was updated successfully, but these errors were encountered: