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 <jianghait...@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 <mattisonc...@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
> >

Reply via email to