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 2020/07/01 03:03:49 UTC

[GitHub] [servicecomb-java-chassis] xiangyanggong opened a new issue #1861: 关于Edge的设计初衷

xiangyanggong opened a new issue #1861:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1861


   我们团队在使用Edge(1.3.0)作为API网关时,发现其在转发时创建了一个新的HttpClientRequest,然后put了几个内置的header,也就是说原请求中的header全部没有透传,这到底是因为:
       1. Edge不是完善的产品,需持续改进(毕竟:2.0.0就可以通过配置支持header的过滤)
       2. 错误的使用方法,Edge不可作为通用的网关,像Nginx一样
       3. 其他原因
   
   谁知道真正的原因,帮忙解答一下,谢谢!
   
   


----------------------------------------------------------------
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.

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1861: 关于Edge的设计初衷

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1861:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1861#issuecomment-652169127


   开发指南可以参考 :&nbsp;&nbsp;https://docs.servicecomb.io/java-chassis/zh_CN/edge/by-servicecomb-sdk/
   
   
   edge service 缺省的转发机制和普通的 HTTP proxy 不一样, 一般的 HTTP proxy 都是基于 HTTP 协议做透传。 但 edge service 不是。 这个和 java-chassis 整体设计理念有关。 java-chassis 的核心是基于 '契约' 的, 中间过程的转换都是基于 '契约' 进行的。 这样的直接好处就是可以独立于业务实现, 基于服务 '契约' 开发治理能力。 比如在 edge servcie 定义一个 handler, 那么可以获取到这个请求对应的 operation id, 参数列表,这些信息可以实现流控、隔离、灰度发布等功能,简化对外配置, 这些是其他网关都做不到的。 另外一个方面,edge servcie 还可以轻松转发 非 HTTP 请求, 比如转发给 java-chassis 的 Highway 协议,里面是没有 http header的概念的。 edge servcie 能确保转发的数据, 是在 `契约` 里面声明的数据。&nbsp;
   
   
   当然,很多时候, 基于 Header 作为控制协议的一部分,很多时候也会用到, edge servcie 也支持通过配置的方式复制允许的header,或者通过 InvocationContext 传递。&nbsp;
   
   
   edge servcie 是非常灵活的, 还有其他的 Dispatcher, 可以像普通 HTTP proxy 那么工作,比如 CommonHttpEdgeDispatcher, 开发者也可以自己扩展更多的 EdgeDispatcher。&nbsp;&nbsp;
   
   
   
   
   ------------------&nbsp;原始邮件&nbsp;------------------
   发件人:&nbsp;"xiangyanggong"<notifications@github.com&gt;;
   发送时间:&nbsp;2020年7月1日(星期三) 中午11:04
   收件人:&nbsp;"apache/servicecomb-java-chassis"<servicecomb-java-chassis@noreply.github.com&gt;;
   抄送:&nbsp;"Subscribed"<subscribed@noreply.github.com&gt;;
   主题:&nbsp;[apache/servicecomb-java-chassis] 关于Edge的设计初衷 (#1861)
   
   
   
   
   
    
   我们团队在使用Edge(1.3.0)作为API网关时,发现其在转发时创建了一个新的HttpClientRequest,然后put了几个内置的header,也就是说原请求中的header全部没有透传,这到底是因为:
    1. Edge不是完善的产品,需持续改进(毕竟:2.0.0就可以通过配置支持header的过滤)
    2. 错误的使用方法,Edge不可作为通用的网关,像Nginx一样
    3. 其他原因
    
   谁知道真正的原因,帮忙解答一下,谢谢!
    
   —
   You are receiving this because you are subscribed to this thread.
   Reply to this email directly, view it on GitHub, or unsubscribe.


----------------------------------------------------------------
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.

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



[GitHub] [servicecomb-java-chassis] xiangyanggong closed issue #1861: 关于Edge的设计初衷

Posted by GitBox <gi...@apache.org>.
xiangyanggong closed issue #1861:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1861


   


----------------------------------------------------------------
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.

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