【问题标题】:Can Spring Cloud Gateway work with microservices that are not asynchronous?Spring Cloud Gateway 可以与非异步的微服务一起使用吗?
【发布时间】:2020-06-06 11:35:49
【问题描述】:

我有一些同步微服务正在使用 Spring Boot 2.X 版本进行生产。很快,如果每个微服务的实例数量要增加,我们就需要实现一个网关。我读到 Zuul 处于维护阶段,并被默认为异步技术的 Spring Cloud Gateway 所取代。我的问题是,我还能用我的微服务实现 Spring Cloud Gateway 吗?

【问题讨论】:

    标签: spring-boot asynchronous microservices synchronous spring-cloud-gateway


    【解决方案1】:

    是的,您可以毫无疑问地使用Spring Cloud Gateway。

    基本上,asynchronous technology 意味着您在 Api Gateway 上的资源/线程不会因为等待下游服务的响应而被阻塞,从而提高了吞吐量。

    现在,一旦您的阻塞服务完成其内部逻辑,它们就会使用最初打开的连接回复Api Gateway。 Api Gateway 反过来回复您的客户。

    【讨论】:

    • 感谢您的回答@StepanTsybulski。它确实帮助我了解了情况。
    猜你喜欢
    • 2021-10-23
    • 1970-01-01
    • 2017-01-03
    • 2017-08-31
    • 2019-07-04
    • 2019-12-15
    • 2015-09-03
    • 2013-07-05
    • 2021-11-02
    相关资源
    最近更新 更多