You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/11/17 09:43:29 UTC

[GitHub] [servicecomb-java-chassis] liubao68 opened a new issue, #3485: Edge Service作为网关和其他常见网关的差异

liubao68 opened a new issue, #3485:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3485

   Edge Service是 servicecomb 提供的一个微服务网关, 他的主要功能是将请求转发到 java chassis开发的微服务。 虽然主要功能也是请求转发,但是和其他网关,比如 Zuul, Spring Cloud Gateway在功能设计上存在很多差异。 这里主要描述其差异。 
   
   # 转发的协议
   
   Edge Service可以将用户的HTTP请求转发到java chassis开发的微服务,不管java chassis开发的微服务是什么协议,比如 REST、Highway等,都可以转发。 Edge Service会自动基于swagger信息进行协议转换。 
   
   # 转发的内容和原始请求的关系
   
   Edge Service不会将原始请求直接转发给后台服务,这个是和其他网关不一样的。 如果后台微服务是一个REST微服务,用户通过HTTP请求传递了很多的头、query参数、body参数等, Edge Service会根据swagger解析消息,只传递后台微服务在swagger声明的头、query参数、body参数等, swagger 未声明的信息会被丢弃。 因此经过edge service转发的HTTP信息,是被重新修改的信息,应用程序不能假设这些信息和用户传递的原始信息是完全相同的。 
   
   在需要额外传递swagger声明的额外信息的时候,需要在Edge Service配置映射或者自定义Filter,将信息放到InvocationContexst里面传递,后台服务可以通过InvocationContext获取。 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org