You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/11 06:44:44 UTC

[GitHub] [apisix] qiqizjl opened a new issue #5041: request help: Does it support follow back to the source?

qiqizjl opened a new issue #5041:
URL: https://github.com/apache/apisix/issues/5041


   ### Issue description
   
   Now you must specify ``http`` or ``https`` in the ``Scheme``. If you need to support http/https at the same time, you must configure two Route or Upstream. How to merge these two configurations? When ``http`` request is forwarded to the backend through ``http``, if it is ``https, use https ``
   
   --------
   
   现在在Scheme处必须指定是http还是https。如果需要同时支持http/https就必须配置两个Route和Upstream。这两个配置如何合并?http请求的时候通过http转发至后端,如果是https则使用https
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):2.9
   - OS (cmd: `uname -a`):Linux ** 4.19.91-24.1.al7.x86_64 #1 SMP Wed Jul 21 17:40:23 CST 2021 x86_64 x86_64 x86_64 GNU/Linux
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): nginx version: openresty/1.19.9.1
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 3.4.0
   - apisix-dashboard version, if have: 2.8
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`): 3.3.1
   


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] tokers commented on issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5041:
URL: https://github.com/apache/apisix/issues/5041#issuecomment-917421571


   > Now the completion logic affects the Upstream information in the worker process. If don't go to Hook for balancer, we may not be able to achieve this requirement. .
   
   That's right, a "decided by client" mechanism is useful. Would you like to submit a PR to support it?


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] qiqizjl commented on issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
qiqizjl commented on issue #5041:
URL: https://github.com/apache/apisix/issues/5041#issuecomment-917420010


   Now the completion logic affects the Upstream information in the worker process. If don't go to Hook for balancer, we may not be able to achieve this requirement. . 


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] tzssangglass commented on issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5041:
URL: https://github.com/apache/apisix/issues/5041#issuecomment-917646519


   > If you need to support http/https at the same time, you must configure two Route or Upstream.
   
   I prefer to configure two routes and upstream if only to solve the problem of both setting up http and https. This change amounts to a shortcut, but it makes APISIX more complex.
   
   Are there other more persuasiveness scenarios where this feature is needed?


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] qiqizjl commented on issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
qiqizjl commented on issue #5041:
URL: https://github.com/apache/apisix/issues/5041#issuecomment-917419635


   > > > Port is decided by the node configuration, if the port in node is missed, then port will be filled according to the scheme.
   > > 
   > > 
   > > yeah.But in balancer.lua, it is judged that the scheme of matchd_upstream is http_auto. Will automatically reselect
   > 
   > Port should be a property of a node, you should only intervene it only if it's missed.
   
   Yes. But if there is such a need to follow source, we need to configure two Upstream and Route. It will be more troublesome 


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] qiqizjl commented on issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
qiqizjl commented on issue #5041:
URL: https://github.com/apache/apisix/issues/5041#issuecomment-917648237


   > I prefer to configure two routes and upstream if only to solve the problem of both setting up http and https. This change amounts to a shortcut, but it makes APISIX more complex.
   > 
   > Are there other more persuasiveness scenarios where this feature is needed?
   
   At present, there is only this reason. It will only increase additional maintenance costs, for ops


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] tokers commented on issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5041:
URL: https://github.com/apache/apisix/issues/5041#issuecomment-917417505


   Port is decided by the node configuration, if the port in node is missed, then port will be filled according to the scheme.


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] qiqizjl commented on issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
qiqizjl commented on issue #5041:
URL: https://github.com/apache/apisix/issues/5041#issuecomment-917379867


   If you increase http_auto in Scheme. And according to ngx.var.scheme to set upstream_scheme. In the load balancing port, just follow the Scheme to get the corresponding port?
   If http_auto is enabled in this way, the port cannot be set, and it is automatically matched by the protocol? 
   
   ----
   如果在Scheme中增加http_auto。并且根据ngx.var.scheme去设置upstream_scheme。在负载均衡的port中,按照Scheme去获取对应的port就可以? 
   如果这样开启了http_auto就无法设置port,由协议自动匹配?
   
   Demo:
   ![image](https://user-images.githubusercontent.com/7540584/132944196-12e64a85-5b27-4810-8aea-610b4ed0eb52.png)
   ![image](https://user-images.githubusercontent.com/7540584/132944208-c9cfc0d9-db14-4e48-81f8-d8c4df09136e.png)
   ![image](https://user-images.githubusercontent.com/7540584/132944202-8fede6b3-8af8-4f26-9f2c-6b958d32f382.png)
   
   


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] tokers commented on issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5041:
URL: https://github.com/apache/apisix/issues/5041#issuecomment-917419054


   > > Port is decided by the node configuration, if the port in node is missed, then port will be filled according to the scheme.
   > 
   > yeah.But in balancer.lua, it is judged that the scheme of matchd_upstream is http_auto. Will automatically reselect
   
   Port should be a property of a node, you should only intervene it only if it's missed.


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] spacewander closed issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #5041:
URL: https://github.com/apache/apisix/issues/5041


   


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] spacewander commented on issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #5041:
URL: https://github.com/apache/apisix/issues/5041#issuecomment-920559539


   Unfortunately, let upstream support multiple schemes will make it more complex. The current solution is already not straightforward. An over-complex solution may be buggy and unstable.


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] qiqizjl commented on issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
qiqizjl commented on issue #5041:
URL: https://github.com/apache/apisix/issues/5041#issuecomment-917418488


   > Port is decided by the node configuration, if the port in node is missed, then port will be filled according to the scheme.
   
   yeah.But in balancer.lua, it is judged that the scheme of matchd_upstream is http_auto. Will automatically reselect 


-- 
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: notifications-unsubscribe@apisix.apache.org

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



[GitHub] [apisix] qiqizjl commented on issue #5041: request help: Does it support follow back to the source?

Posted by GitBox <gi...@apache.org>.
qiqizjl commented on issue #5041:
URL: https://github.com/apache/apisix/issues/5041#issuecomment-920134907


   Hi. Is there any progress on this matter? If it is determined to be handled by two Route/Upstream, then I will close issue and pr 


-- 
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: notifications-unsubscribe@apisix.apache.org

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