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/06/17 03:40:58 UTC

[GitHub] [servicecomb-java-chassis] anqurvanillapy opened a new issue #1836: Are there any reverse-proxy features like HttpServletRequest.getRequestDispatcher().forward?

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


   # TL;DR
   
   * Is `HttpServletRequest.getRequestDispatcher().forward` supported?
   * If not, why?
   * Any alternative APIs to `forward` for reverse-proxy?
   
   # Context
   
   We're planning to create a new gateway service that is much like EdgeService and Nginx, basically doing reverse-proxy for internal services, but with heavy authentication and authorization due to the exposure to public network.
   
   We have an existing project to take some reference but it's based on plain old Spring MVC, hence its lacking of service registry makes us consider the use of ServiceComb.  But eventually the `forward` API throws a not-supported exception from ServiceComb.
   
   All solutions we found currently:
   
   * Nginx: It's hard to integrate as a service registered to ServiceComb center
   * Zuul: May be the best solution in the future, but now we're not available for doing research
   * Controller + a handwritten Vert.x HTTP client to forward requests: May have poor robustness
   * Spring MVC's `forward`: Seems not supported by ServiceComb


----------------------------------------------------------------
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 edited a comment on issue #1836: Are there any reverse-proxy features like HttpServletRequest.getRequestDispatcher().forward?

Posted by GitBox <gi...@apache.org>.
liubao68 edited a comment on issue #1836:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1836#issuecomment-645252294


   You can take 3rd party services same as servicecomb service, please refer to [this](http://localhost:8000/registry/multi-registries/#_2)
   
   This way need configure swaggers in edge service, and it's helpful when 3rd party services count is not that huge. 
   
   This feature will be available in 2.1.0, however you can use it in versions before in  quite a different way, see links in that doc too. 
   
   And maybe [this edge feature](http://localhost:8000/featured-topics/features/http-dispatcher/) is helpful for you too


----------------------------------------------------------------
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] anqurvanillapy commented on issue #1836: Are there any reverse-proxy features like HttpServletRequest.getRequestDispatcher().forward?

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


   @liubao68 What if the **target service** is not based on ServiceComb, that is, without any service registry and required to be invoked via `HOST:IP`?  It's an important reason why we chose to use `forward`/HTTP client to deliver the requests.


----------------------------------------------------------------
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 #1836: Are there any reverse-proxy features like HttpServletRequest.getRequestDispatcher().forward?

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


   You can take 3rd party services same as servicecomb service, please refer to [this](http://localhost:8000/registry/multi-registries/#_2)
   
   This way need configure swaggers in edge service, and it's helpful when 3rd party services count is not that huge. 
   
   This feature will be available in 2.1.0, however you can use it in versions before in  quite a different way, see links in that doc too. 


----------------------------------------------------------------
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] anqurvanillapy commented on issue #1836: Are there any reverse-proxy features like HttpServletRequest.getRequestDispatcher().forward?

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


   Just curious, what if the target service is another edge service?  Or worse, it is simply an Nginx instance that is impossible to have a concrete set of contracts?  We're now getting to have Spring Boot + Zuul as the final solution in the future, actually.


----------------------------------------------------------------
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 #1836: Are there any reverse-proxy features like HttpServletRequest.getRequestDispatcher().forward?

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


   For sultion 3 you listed, you can create a controller in edge service, and this controller forward to traget service. 
   
   Or maybe you can add an custom `AbstractEdgeDispatcher` to do this. Edge service provide many `AbstractEdgeDispatcher` implementations and all disptach rule are based on these implementation.


----------------------------------------------------------------
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] anqurvanillapy closed issue #1836: Are there any reverse-proxy features like HttpServletRequest.getRequestDispatcher().forward?

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


   


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