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

Use puma instead of unicorn #3694

Merged
merged 4 commits into from
Oct 12, 2019
Merged

Use puma instead of unicorn #3694

merged 4 commits into from
Oct 12, 2019

Conversation

javierm
Copy link
Member

@javierm javierm commented Sep 11, 2019

References

Objectives

  • Replace unicorn with puma, a server which is more advanced and we already use in the development environment.
  • Simplify configuration files thanks to capistrano3-puma

Release notes

⚠️ We've replaced unicorn with puma. There's no need to change your nginx configuration if you were using a standard unicorn configuration. However, on your nginx configuration you might want to change the line saying:

server unix:/home/deploy/consul/shared/sockets/unicorn.sock;

To:

server unix:/home/deploy/consul/shared/tmp/sockets/puma.sock fail_timeout=0;

So when reading that file it's obvious you're using puma and not unicorn.

@javierm javierm added this to Reviewing in Roadmap via automation Sep 11, 2019
@javierm javierm moved this from Reviewing to Doing in Roadmap Sep 11, 2019
@javierm javierm changed the title [WIP] Use puma instead of unicorn Use puma instead of unicorn Oct 8, 2019
@javierm javierm moved this from Doing to Reviewing in Roadmap Oct 8, 2019
@javierm javierm self-assigned this Oct 8, 2019
@javierm javierm force-pushed the puma branch 3 times, most recently from c25464f to 63d792b Compare October 9, 2019 12:48
@javierm javierm moved this from Reviewing to Testing in Roadmap Oct 9, 2019
config/deploy.rb Outdated Show resolved Hide resolved
Our current unicorn task wasn't working in some cases. We also had a
version in the `capistrano` branch, which was the one we recommended.
However, that version assumed RVM, a certain ruby version and a certain
deploy folder were used. This version uses `bundle exec` and variables
like `release_path`, so it does not depend on any specific
configuration.

Even if we're replacing unicorn with puma, I wanted to make this change
in case we need it as a reference in the future.
Puma is the server we use in the development environment, so this way we
don't need to maintain two servers. Furthermore, puma seems to offer a
few advantages over unicorn (like multithreading) and no disadvantages.
Puma was adding commands to `rvm_map_bins`, which meant RMV1 wasn't
using the default value of `rvm1_map_bins`.

Changing the order we use to require `rmv1/capistrano3` and
`capistrano/puma` did not fix the issue.
Old CONSUL nginx configurations will probably have a reference to a
unicorn socket. Making that file a symbolic link to a puma socket makes
it possible for the application to keep working without updating the
nginx configuration file.
@javierm javierm merged commit b30aaed into master Oct 12, 2019
Roadmap automation moved this from Testing to Release 1.1.0 Oct 12, 2019
@javierm javierm deleted the puma branch October 12, 2019 21:53
smarques pushed a commit to venetochevogliamo/consul that referenced this pull request Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Roadmap
  
Release 1.1.0
Development

Successfully merging this pull request may close these issues.

None yet

2 participants