title: Sinatra Synchrony with Redis connection pooling
body: <p>Is this the correct way of handling Redis connection pooling with <a href="https://github.com/kyledrake/sinatra-synchrony" rel="nofollow">Sinatra Synchrony</a>?</p>
  
  <p>My gemfile looks like this:</p>
  
  <pre><code>gem 'sinatra-synchrony'
  gem 'hiredis'
  gem 'redis'
  </code></pre>
  
  <p>The sinatra server files use the classic style approach, and generally look like so:</p>
  
  <pre><code>require 'sinatra'
  require 'sinatra/synchrony'
  require 'redis/connection/hiredis'
  require 'redis/connection/synchrony'
  require 'redis'
  
  redis = EventMachine::Synchrony::ConnectionPool.new(size: 5) do
    Redis.new(path: '/tmp/redis.sock')
  end
  
  get / do
    # lots of redis reads and writes
  end
  </code></pre>
  
  <p>I then launch multiple instances of the same server application, each under a different port, and use nginx to load balance between them.</p>
  
  <p>Is this the proper solution for connection pooling Redis with Sinatra servers?</p>