You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apisix.apache.org by Zhiyuan Ju <ju...@apache.org> on 2022/02/14 08:12:00 UTC

Re: [Proposal] refactor server-info

Hi,

If there have any updates, please let us know :)

Best Regards!
@ Zhiyuan Ju <https://github.com/juzhiyuan>


Ming Wen <we...@apache.org> 于2022年1月21日周五 17:10写道:

> So I think it's a serious bug, we should fix it ASAP.
>
> Thanks,
> Ming Wen, Apache APISIX PMC Chair
> Twitter: _WenMing
>
>
> Bozhong Yu <im...@gmail.com> 于2022年1月21日周五 16:32写道:
>
> > I'm not sure if it can be defined as a bug, but it would cause etcd to
> slow
> > down and increase cpu usage, which is unreasonable.
> > The server-info plugin is only used to report whether the Apache APISIX
> > node is survival and should not write a lot of data to etcd.
> >
> > Ming Wen <we...@apache.org> 于2022年1月21日周五 15:45写道:
> >
> > > > Currently, server-info plugin adds a revision every time the status
> is
> > > updated, and some users set a relatively short reporting time, which
> may
> > > result in millions or even tens of millions of data in etcd after a
> long
> > > run, resulting in a slow connection and high cpu usage. So I give a
> > > proposal to refractory the server-info plugin.
> > >
> > > Is this a serious bug?
> > >
> > > Thanks,
> > > Ming Wen, Apache APISIX PMC Chair
> > > Twitter: _WenMing
> > >
> > >
> > > Bozhong Yu <im...@gmail.com> 于2022年1月21日周五 14:02写道:
> > >
> > > > Hi Community.
> > > >
> > > > Currently, server-info plugin adds a revision every time the status
> is
> > > > updated, and some users set a relatively short reporting time, which
> > may
> > > > result in millions or even tens of millions of data in etcd after a
> > long
> > > > run, resulting in a slow connection and high cpu usage. So I give a
> > > > proposal to refractory the server-info plugin.
> > > >
> > > > Here is a new implement:
> > > >
> > > > 1. get the server-info data, if it does not exist, initialize the
> > > > server-info information
> > > > 2. bind the lease to the key "server-info"
> > > > 3. call keepalive to refresh the TTL to ensure the node is alive
> > > >
> > > > Flowchart:
> > > >
> > > > [image: image.png]
> > > >
> > > > What about your opinions?
> > > >
> > >
> >
>

Re: [Proposal] refactor server-info

Posted by Bozhong Yu <im...@gmail.com>.
Thanks leslie.tsang reply. @juzhiyuan, I am fixing test cases.

Leslie Tsang <le...@icloud.com.invalid> 于2022年2月14日周一 16:38写道:

> There is a related PR[1] being fixed here.
>
> [1] https://github.com/apache/apisix/pull/6202 <
> https://github.com/apache/apisix/pull/6202>
>
> Leslie Tsang
> leslie.tsang@icloud.com
>
> > On 14 Feb 2022, at 4:12 PM, Zhiyuan Ju <ju...@apache.org> wrote:
> >
> > Hi,
> >
> > If there have any updates, please let us know :)
> >
> > Best Regards!
> > @ Zhiyuan Ju <https://github.com/juzhiyuan>
> >
> >
> > Ming Wen <we...@apache.org> 于2022年1月21日周五 17:10写道:
> >
> >> So I think it's a serious bug, we should fix it ASAP.
> >>
> >> Thanks,
> >> Ming Wen, Apache APISIX PMC Chair
> >> Twitter: _WenMing
> >>
> >>
> >> Bozhong Yu <im...@gmail.com> 于2022年1月21日周五 16:32写道:
> >>
> >>> I'm not sure if it can be defined as a bug, but it would cause etcd to
> >> slow
> >>> down and increase cpu usage, which is unreasonable.
> >>> The server-info plugin is only used to report whether the Apache APISIX
> >>> node is survival and should not write a lot of data to etcd.
> >>>
> >>> Ming Wen <we...@apache.org> 于2022年1月21日周五 15:45写道:
> >>>
> >>>>> Currently, server-info plugin adds a revision every time the status
> >> is
> >>>> updated, and some users set a relatively short reporting time, which
> >> may
> >>>> result in millions or even tens of millions of data in etcd after a
> >> long
> >>>> run, resulting in a slow connection and high cpu usage. So I give a
> >>>> proposal to refractory the server-info plugin.
> >>>>
> >>>> Is this a serious bug?
> >>>>
> >>>> Thanks,
> >>>> Ming Wen, Apache APISIX PMC Chair
> >>>> Twitter: _WenMing
> >>>>
> >>>>
> >>>> Bozhong Yu <im...@gmail.com> 于2022年1月21日周五 14:02写道:
> >>>>
> >>>>> Hi Community.
> >>>>>
> >>>>> Currently, server-info plugin adds a revision every time the status
> >> is
> >>>>> updated, and some users set a relatively short reporting time, which
> >>> may
> >>>>> result in millions or even tens of millions of data in etcd after a
> >>> long
> >>>>> run, resulting in a slow connection and high cpu usage. So I give a
> >>>>> proposal to refractory the server-info plugin.
> >>>>>
> >>>>> Here is a new implement:
> >>>>>
> >>>>> 1. get the server-info data, if it does not exist, initialize the
> >>>>> server-info information
> >>>>> 2. bind the lease to the key "server-info"
> >>>>> 3. call keepalive to refresh the TTL to ensure the node is alive
> >>>>>
> >>>>> Flowchart:
> >>>>>
> >>>>> [image: image.png]
> >>>>>
> >>>>> What about your opinions?
> >>>>>
> >>>>
> >>>
> >>
>
>

Re: [Proposal] refactor server-info

Posted by Leslie Tsang <le...@icloud.com.INVALID>.
There is a related PR[1] being fixed here.

[1] https://github.com/apache/apisix/pull/6202 <https://github.com/apache/apisix/pull/6202>

Leslie Tsang
leslie.tsang@icloud.com

> On 14 Feb 2022, at 4:12 PM, Zhiyuan Ju <ju...@apache.org> wrote:
> 
> Hi,
> 
> If there have any updates, please let us know :)
> 
> Best Regards!
> @ Zhiyuan Ju <https://github.com/juzhiyuan>
> 
> 
> Ming Wen <we...@apache.org> 于2022年1月21日周五 17:10写道:
> 
>> So I think it's a serious bug, we should fix it ASAP.
>> 
>> Thanks,
>> Ming Wen, Apache APISIX PMC Chair
>> Twitter: _WenMing
>> 
>> 
>> Bozhong Yu <im...@gmail.com> 于2022年1月21日周五 16:32写道:
>> 
>>> I'm not sure if it can be defined as a bug, but it would cause etcd to
>> slow
>>> down and increase cpu usage, which is unreasonable.
>>> The server-info plugin is only used to report whether the Apache APISIX
>>> node is survival and should not write a lot of data to etcd.
>>> 
>>> Ming Wen <we...@apache.org> 于2022年1月21日周五 15:45写道:
>>> 
>>>>> Currently, server-info plugin adds a revision every time the status
>> is
>>>> updated, and some users set a relatively short reporting time, which
>> may
>>>> result in millions or even tens of millions of data in etcd after a
>> long
>>>> run, resulting in a slow connection and high cpu usage. So I give a
>>>> proposal to refractory the server-info plugin.
>>>> 
>>>> Is this a serious bug?
>>>> 
>>>> Thanks,
>>>> Ming Wen, Apache APISIX PMC Chair
>>>> Twitter: _WenMing
>>>> 
>>>> 
>>>> Bozhong Yu <im...@gmail.com> 于2022年1月21日周五 14:02写道:
>>>> 
>>>>> Hi Community.
>>>>> 
>>>>> Currently, server-info plugin adds a revision every time the status
>> is
>>>>> updated, and some users set a relatively short reporting time, which
>>> may
>>>>> result in millions or even tens of millions of data in etcd after a
>>> long
>>>>> run, resulting in a slow connection and high cpu usage. So I give a
>>>>> proposal to refractory the server-info plugin.
>>>>> 
>>>>> Here is a new implement:
>>>>> 
>>>>> 1. get the server-info data, if it does not exist, initialize the
>>>>> server-info information
>>>>> 2. bind the lease to the key "server-info"
>>>>> 3. call keepalive to refresh the TTL to ensure the node is alive
>>>>> 
>>>>> Flowchart:
>>>>> 
>>>>> [image: image.png]
>>>>> 
>>>>> What about your opinions?
>>>>> 
>>>> 
>>> 
>>