|
Dave Cheney |
at Jun 25, 2013 at 2:50 am
|
⇧ |
| |
Ok, so now we're getting to the actual problem you are trying to solve.
Some comments
1. Do you really need zero downtime, how about 1 second downtime ? 5
seconds, 10 seconds ?
2. If you really need zero downtime, then you can't achieve that with
a single process, so you're really talking about how to cleanly
shutdown one worker at a time for a rolling upgrade scenario.
3. You should research how products like nginx do process restarts,
they don't use socket tricks like this, they just pass the accepting
socket down to a child process.
So, some questions
1. what platform(s) are you targeting ?
2. what is your SLA ?
3. how are you currently managing your process at the moment, and how
quickly can it restart the process if it fails ?
Cheers
Dave
On Tue, Jun 25, 2013 at 12:46 PM, Ewan Chou wrote:If two process can listen on the same port, then the application can do
zero-downtime restart.
On Tuesday, June 25, 2013 10:38:40 AM UTC+8, Dave Cheney wrote:
I can make two processes listen on the same port now, but only through
"syscall".
Why do you need to do such a thing ? The only use cases for this
facility that I am aware of is listening to a UDP port for multicast
messages (ie, mDNS)
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out. --
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.