Talk about my thoughts: It is a standard feature to help microservices accelerate access to static files as an API gateway.
The question is how? 1. client-> gateway (proxy cache)-> microservice 2. client-> gateway (static)-> microservice Of these two cases, case 2 seems to be better. Because it puts some static files of microservice into the API gateway, it destroys the integrity of the microservice itself. This makes the long-term management of microservice objects more complicated. In addition, case 1 can use nginx proxy cache module, and the access efficiency of cache files is the same as local static files. The access speed of cache files is the same as local static files. On Tue, Apr 21, 2020 at 8:48 AM 15717900 <15717...@qq.com> wrote: > hi, > > > Thank you for your reply. I really agree with the positioning problem you > mentioned. The positioning of a product is very important. > > > On this issue, I would like to add two points, which are also the original > intention of my discussion. > > > 1. In the Internet scenario, more and more services will be opened in the > form of pages. which we temporarily call "pages share". In this scenario, > the definition of services is not limited to the traditional background > microservices, and wechat mini programs are a good example. > > > 2. If there is a static page in the upstream service, the function of > APISIX as the entry will degenerate into a "seven layer load with flow > control". For example, "/ user" microservice, in the traditional scenario, > we can control the granularity of "/ user / qryinfo"; "/ user / add"; "/ > user / del". However, if there are static pages in the user service, we can > only forward all / user / * to the upstream, and can't do fine-grained > control. > > > These are my ideas about static page management. Welcome to discuss. > > > > > > ------------------ 原始邮件 ------------------ > 发件人: "Zhang Qiang"<dotslash...@gmail.com>; > 发送时间: 2020年4月21日(星期二) 凌晨0:29 > 收件人: "dev"<dev@apisix.apache.org>; > > 主题: Re: Hopefully, APISIX will enable the management of static > resources > > > > I raised a question similar to this days ago. But I had some > after-thoughts after the team kindly replied it’s not possible without > writing some Nginx configurations to serve static content on the > gateway > server now. > > I thought Apisix it self is not aimed to replace Nginx, it’s an **API** > Gateway for micro services, serving content on the gateway itself is > against the best practice of micro-service. In micro-service’s context, you > do one thing with a component and do it well. To do so I think it’s better > to create a service which serves static files. > > This is just my two cents, if this feature is really implemented by the > team, I’ll also welcome it. > > 15717900 <15717...@qq.com>于2020年4月20日 周一下午10:52写道: > > > hello > > &nbsp; &nbsp; Static resource management is split into two > nginx in some > > scenarios, with some performance loss. Is it possible to solve the > problem > > of static resources by means of plug-ins. Also, the A/B testing of > static > > resources needs to be considered along with it. > > > > > > Thanks, > > Wei Guo > > -- > DSL -- *MembPhis* My github: https://github.com/membphis Apache APISIX: https://github.com/apache/incubator-apisix