Em 02-11-2017 21:02, Jeremy Evans escreveu:
I'll try to find some time to try those methods and will let you
know in case I face any issues with that approach.
Great! Please let me know what you find out.
Hi, I've setup a sample database with custom row types and registered
another server and used the server_block extension to register the row
type in both databases. Then I switched them and it worked seamless.
Without registering the row type in the extra server it would return a
string instead of a hash after switching the database. This is good to
know as it will allow me to have a smoother upgrade next time.
Also, I was thinking more about the restart approach and I realized I
could handle the server restart differently in those situations. Puma
accepts some signals that would cause new requests to go to a new
process and it would queue the connections until the server is able to
accept the requests, which means it would respond a bit slower while the
application is rebooting but the user wouldn't see any error from nginx.
Currently, to make things simpler, "systemctl restart my-app" would stop
the application, remove the Docker container and recreate it. However I
could use "docker kill" to send a hot restart signal to the cluster main
process instead.
Since we always deploy using a blue-green setup we don't need to worry
about any downtime in the blue environment while nginx is pointing to
green. But to support those cases more gracefully, I'll take a closer
look at systemd documentation in order to override the restart command
to send a signal to its main process instead. Or maybe create some new
command if possible such as "systemctl hot-restart my-app".
Anyway, thank you very much for your working suggestion :)
Cheers,
Rodrigo.
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.