>
> 1. Although other API-gateways, such as Tyk and Zuul, can load its route
> configuration from the Redis or the Consul, they still write its route
> configuration to the local.
>

I actually care more about the benefits this feature brings to users and
developers,
not because others also have this feature.

2. APISIX can run without etcd and needn't be configured again after
> reload. If the user just wants to run APISIX without the etcd, without
> writing config to local disk, the user has to reconfigure the APISIX after
> the restart.
>

Switching between etcd and stand-alone mode in APISIX is a dangerous and
rare operation,
it is not good to provide convenience in this regard.

hui li <yo...@apache.org> 于2019年11月6日周三 下午4:43写道:

> If the etcd conflicts with the local configuration file, the etcd shall
> prevail.
>
> Let me summarize, the reason for writing the routes configuration file to
> the local disk are as follows.
>
> 1. Although other API-gateways, such as Tyk and Zuul, can load its route
> configuration from the Redis or the Consul, they still write its route
> configuration to the local.
>
2. APISIX can run without etcd and needn't be configured again after
> reload. If the user just wants to run APISIX without the etcd, without
> writing config to local disk, the user has to reconfigure the APISIX after
> the restart.
>
3. Because APISIX synchronizes incremental config from the etcd, there is a
> possibility that the configuration in APISIX is not the same as the
> configuration in the etcd(There may be bugs.). Writing the route
> configuration to the local can help position the bug or the different
> configuration.
>
> Ming Wen <wenm...@apache.org> 于2019年11月6日周三 上午11:10写道:
>
> > The actual situation will be more complicated than this.
> > What if the etcd conflicts with the local configuration file?
> >
> > Apache APISIX is not a database, it is stateless and allows downtime.
> > So my opinion is to keep the logic as simple as possible.
> >
> > Thanks,
> > Ming Wen, Apache APISIX
> > Twitter: _WenMing
> >
> >
> > hui li <yo...@apache.org> 于2019年11月6日周三 上午11:04写道:
> >
> > > hi Ming,
> > > if APISIX writes the route configuration to the local dist, I think
> that
> > > APISIX should load the local configuration first, then the APISIX
> should
> > > load the full configuration from the etcd.
> > > after loading full config from the etcd, APISIX can synchronize
> > incremental
> > > config from etcd.
> > >
> > > Thanks,
> > > yousa
> > >
> > > Ming Wen <wenm...@apache.org> 于2019年11月5日周二 下午2:16写道:
> > >
> > > >  If we add a local configuration file for etcd mode,
> > > > etcd is incrementally synchronized in APISIX and does not guarantee
> > final
> > > > consistency,
> > > > and the conflict between etcd and the configuration file will bring
> > high
> > > > complexity.
> > > >
> > > > I don't think this is worth it.
> > > >
> > > > Thanks,
> > > > Ming Wen, Apache APISIX
> > > > Twitter: _WenMing
> > > >
> > > >
> > > > YuanSheng Wang <membp...@apache.org> 于2019年11月5日周二 下午2:03写道:
> > > >
> > > > > Hi Ming:
> > > > >
> > > > > This is two different features.
> > > > >
> > > > > When the service is restarted and etcd is not working properly, the
> > > last
> > > > > correct configuration is read from the configuration backup file.
> > > > >
> > > > > This mechanism ensures that the APISIX service will work normal
> > first.
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Nov 5, 2019 at 1:28 PM Ming Wen <wenm...@apache.org>
> wrote:
> > > > >
> > > > > > Hi, hui,
> > > > > > Apache APISIX supports stand-alone mode and declarative API [1],
> > > > > > so it already has a local configuration file.
> > > > > >
> > > > > > Do you mean we should support local configuration file when using
> > > etcd
> > > > > > mode?
> > > > > >
> > > > > > [1]
> > > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/apache/incubator-apisix/blob/master/doc/stand-alone.md
> > > > > >
> > > > > > Thanks,
> > > > > > Ming Wen, Apache APISIX
> > > > > > Twitter: _WenMing
> > > > > >
> > > > > >
> > > > > > hui li <yo...@apache.org> 于2019年11月5日周二 上午11:45写道:
> > > > > >
> > > > > > > Does the APISIX need to write the configuration to the local
> > disk?
> > > > > > >
> > > > > > > The APISIX currently can run without the configuration center,
> > > etcd.
> > > > > > >
> > > > > > > But its routes configuration just is stored in the memory. If
> > > APISIX
> > > > > runs
> > > > > > > without etcd or could not connect the etcd (still possible),
> > > > meanwhile,
> > > > > > > APISIX has been restarted because of some critical BUG. APISIX
> > will
> > > > > > restart
> > > > > > > with no route configuration which will cause the network
> failure.
> > > > > > >
> > > > > > > On the other hand, other API-Gateway, such as tyk or zuul, will
> > > write
> > > > > the
> > > > > > > configuration to the local disk when it exit.
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > *MembPhis*
> > > > > My github: https://github.com/membphis
> > > > > Apache APISIX: https://github.com/apache/incubator-apisix
> > > > >
> > > >
> > >
> >
>

Reply via email to