load balancer on complete_unicorn_nginx_postgresql

259 views
Skip to first unread message

Thimios Dimopulos

unread,
Apr 1, 2013, 3:19:41 PM4/1/13
to rubbe...@googlegroups.com
Hi all,

I am using the latest stable rubber version and the default complete_unicorn_nginx_postgresql template. I understand that there is no haproxy anymore in this template.

Does this mean that nginx is the load balancer on this template?

I started with one instance with roles web, app, web_tools and one instance with role: db:primary=true. When I added another instance of role app, it seems not to be receiving any requests (I monitor all app instances on newrelic).

Do I need to add the haproxy role in order to be able to add more app instances to the cluster? Is there another point I am maybe completely missing?

Thanks a lot,

Thimios

Gordon McNaughton

unread,
Apr 1, 2013, 11:04:33 PM4/1/13
to rubbe...@googlegroups.com
Hi Thimios,

Not sure my experience translates 100% (I'm using passenger instead of unicorn), but I dropped haproxy in favor of an ELB (Amazon Elastic Load Balancer).  It's straightforward to set up, though instances have to be added manually.

The setup looks like this:
Requests hit the ELB, which forwards them to nginx on a [web,app] instance.  nginx passes the request to passenger on the same instance.

This is not ideal -- the web and app tiers are running on the same instances -- but it seems to work!

Hope that helps,
-G

Thimios Dimopulos

unread,
Apr 2, 2013, 11:26:07 AM4/2/13
to rubbe...@googlegroups.com
Hi Gordon,

thanks a lot for your reply. I would prefer to avoid setting up ELB and rather follow the standard rubber way if it provides a load balancer. It is unclear to me how to do a simple multiinstance setup.

I am using the complete_unicorn_nginx_postgresql template and I would like to have one instance running the database and two instances running the app. 

What roles should I give to them to have that simple setup? Do I need to additionally vulanize with the haproxy template in order to have a load balancer? 

Does anyone have such a setup running and could recommend the appropriate roles?

thanks a lot!

Thimios




--
You received this message because you are subscribed to a topic in the Google Groups "rubber" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubber-ec2/BxxlrZ1lEug/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to rubber-ec2+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Message has been deleted

Gabriel Cebrian

unread,
Apr 6, 2013, 7:02:53 PM4/6/13
to rubbe...@googlegroups.com
Hi Thimios,

I am stuck on this just like you. I actually added web: [haproxy] to my rubber-complete file and deployed a web role box but I cannot get the web box to work.

Any ideas on this is appreciated.

Gabriel

Thimios Dimopulos

unread,
Apr 7, 2013, 5:27:47 AM4/7/13
to rubbe...@googlegroups.com
I decided not not use haproxy but elb. I created:

* ALIAS=db01 ROLES="db:primary=true" cap rubber:create
* ALIAS=app01,app02 ROLES=web,app cap rubber:create

I created an ELB and added the two instances manually to it
Reply all
Reply to author
Forward
0 new messages