Limit number of concurrent connections

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Limit number of concurrent connections

Navdeep Singh
Hi,

Kindly let me know how can I limit the number of simultaneous connections in RabbitMQ. Is there a way to do it and if yes how it can be achived. Kindly look at cloudamqp.com who are able to do it by limiting 3 connections for free plan.

This is urgent and need your help.

Regards,
Navdeep

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Limit number of concurrent connections

Simon MacMullen-2
On 21/05/2014 18:12, Navdeep Singh wrote:
> Kindly let me know how can I limit the number of simultaneous
> connections in RabbitMQ. Is there a way to do it and if yes how it can
> be achived. Kindly look at cloudamqp.com <http://cloudamqp.com> who are
> able to do it by limiting 3 connections for free plan.

You'd need to do it with an external agent polling the management API or
listening to the events exchange and then closing connections which are
over the limit. There's no other way I'm afraid.

Cheers, Simon

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Limit number of concurrent connections

Matthias Radestock-3
On 22/05/14 09:48, Simon MacMullen wrote:
> On 21/05/2014 18:12, Navdeep Singh wrote:
>> Kindly let me know how can I limit the number of simultaneous
>> connections in RabbitMQ. Is there a way to do it and if yes how it can
>> be achived. Kindly look at cloudamqp.com <http://cloudamqp.com> who are
>> able to do it by limiting 3 connections for free plan.
>
> You'd need to do it with an external agent polling the management API or
> listening to the events exchange and then closing connections which are
> over the limit. There's no other way I'm afraid.

Or connect via a sufficiently smart proxy.

Matthias.
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Limit number of concurrent connections

Michael Klishin-2
 On 22 May 2014 at 12:53:59, Matthias Radestock ([hidden email]) wrote:
> > Or connect via a sufficiently smart proxy.

e.g. haproxy which has maxconn:
http://haproxy.1wt.eu/download/1.3/doc/haproxy-en.txt
--  
MK  

Software Engineer, Pivotal/RabbitMQ
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Limit number of concurrent connections

Michael Klishin-2
On 22 May 2014 at 13:55:11, Navdeep Singh ([hidden email]) wrote:
> > But Michael, I have a question here that if I have to limit connections  
> at the vhost level how I will be able to do it. As haproxy maxconn  
> parameter is at the member pool level but I am sure it will not be  
> able to understand vhost.

TCP proxies are unaware of vhosts. For that, you need to monitor connections over HTTP API
as Simon suggested. 
--  
MK  

Software Engineer, Pivotal/RabbitMQ
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Limit number of concurrent connections

Matthias Radestock-3
On 22/05/14 11:04, Michael Klishin wrote:

> On 22 May 2014 at 13:55:11, Navdeep Singh ([hidden email])
> wrote:
>>> But Michael, I have a question here that if I have to limit
>>> connections
>> at the vhost level how I will be able to do it. As haproxy maxconn
>> parameter is at the member pool level but I am sure it will not be
>> able to understand vhost.
>
> TCP proxies are unaware of vhosts. For that, you need to monitor
> connections over HTTP API as Simon suggested.

Or use a proxy that is AMQP-aware and can thus track connections by
vhost. No idea whether such a thing exists, but it wouldn't be hard to
write.

Matthias.
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss