You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by mattison chao <ma...@apache.org> on 2022/08/16 02:33:07 UTC

[DISCUSS] Support `brokerMaxConnectionsPerIp` on Pulsar proxy

Hi, All

Pulsar has the `brokerMaxConnectionsPerIp` configuration at the
broker, we can use it to limit the maximum connections per IP.

The original motivation and PR here: https://github.com/apache/pulsar/pull/10754

IMO,  we can also apply it to pulsar-proxy, because when a large
number of proxy accesses under the same IP (maybe due to some wrong
operations) will cause the proxy to accept too much wrong traffic and
cause service unstable.

WDYT?

Best,
Mattison

Re: [DISCUSS] Support `brokerMaxConnectionsPerIp` on Pulsar proxy

Posted by Qiang Huang <qi...@gmail.com>.
Good idea. The implementation should provide an appropriate exception to
prevent the client from reconnecting continuously if it reaches the
limitation. Do other modules also need this?

Michael Marshall <mm...@apache.org> 于2022年8月16日周二 13:52写道:

> Good idea, it makes sense to me to add this to the proxy.
>
> > BTW, are there any side effects from the implementation?
>
> Reading through the code from
> https://github.com/apache/pulsar/pull/10754, it looks like the cost is
> minimal. The broker maintains counters for each IP address, and they
> are incremented/decremented when a ServerCnx goes active/inactive.
>
> Thanks,
> Michael
>
> On Mon, Aug 15, 2022 at 11:27 PM Haiting Jiang <ji...@gmail.com>
> wrote:
> >
> > Sounds good. It's good for server stability.
> >
> > BTW, are there any side effects from the implementation?
> >
> > On Tue, Aug 16, 2022 at 10:33 AM mattison chao <ma...@apache.org>
> > wrote:
> >
> > > Hi, All
> > >
> > > Pulsar has the `brokerMaxConnectionsPerIp` configuration at the
> > > broker, we can use it to limit the maximum connections per IP.
> > >
> > > The original motivation and PR here:
> > > https://github.com/apache/pulsar/pull/10754
> > >
> > > IMO,  we can also apply it to pulsar-proxy, because when a large
> > > number of proxy accesses under the same IP (maybe due to some wrong
> > > operations) will cause the proxy to accept too much wrong traffic and
> > > cause service unstable.
> > >
> > > WDYT?
> > >
> > > Best,
> > > Mattison
> > >
>


-- 
BR,
Qiang Huang

Re: [DISCUSS] Support `brokerMaxConnectionsPerIp` on Pulsar proxy

Posted by Michael Marshall <mm...@apache.org>.
Good idea, it makes sense to me to add this to the proxy.

> BTW, are there any side effects from the implementation?

Reading through the code from
https://github.com/apache/pulsar/pull/10754, it looks like the cost is
minimal. The broker maintains counters for each IP address, and they
are incremented/decremented when a ServerCnx goes active/inactive.

Thanks,
Michael

On Mon, Aug 15, 2022 at 11:27 PM Haiting Jiang <ji...@gmail.com> wrote:
>
> Sounds good. It's good for server stability.
>
> BTW, are there any side effects from the implementation?
>
> On Tue, Aug 16, 2022 at 10:33 AM mattison chao <ma...@apache.org>
> wrote:
>
> > Hi, All
> >
> > Pulsar has the `brokerMaxConnectionsPerIp` configuration at the
> > broker, we can use it to limit the maximum connections per IP.
> >
> > The original motivation and PR here:
> > https://github.com/apache/pulsar/pull/10754
> >
> > IMO,  we can also apply it to pulsar-proxy, because when a large
> > number of proxy accesses under the same IP (maybe due to some wrong
> > operations) will cause the proxy to accept too much wrong traffic and
> > cause service unstable.
> >
> > WDYT?
> >
> > Best,
> > Mattison
> >

Re: [DISCUSS] Support `brokerMaxConnectionsPerIp` on Pulsar proxy

Posted by Haiting Jiang <ji...@gmail.com>.
Sounds good. It's good for server stability.

BTW, are there any side effects from the implementation?

On Tue, Aug 16, 2022 at 10:33 AM mattison chao <ma...@apache.org>
wrote:

> Hi, All
>
> Pulsar has the `brokerMaxConnectionsPerIp` configuration at the
> broker, we can use it to limit the maximum connections per IP.
>
> The original motivation and PR here:
> https://github.com/apache/pulsar/pull/10754
>
> IMO,  we can also apply it to pulsar-proxy, because when a large
> number of proxy accesses under the same IP (maybe due to some wrong
> operations) will cause the proxy to accept too much wrong traffic and
> cause service unstable.
>
> WDYT?
>
> Best,
> Mattison
>