You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "KamenRiderKuuga (via GitHub)" <gi...@apache.org> on 2023/05/25 06:13:06 UTC

[GitHub] [apisix] KamenRiderKuuga opened a new issue, #9544: help request: How to set the upstream host dynamically

KamenRiderKuuga opened a new issue, #9544:
URL: https://github.com/apache/apisix/issues/9544

   ### Description
   
   I'm trying to set the upstream host dynamically and unknown in advance like this:
   
   remote_uri: /api/data-manage/...
   then set the host to: data-manage
   
   I've tried the proxy-rewrite and the custom balancer, but still can't get this to work.
   
   Is there any suggestion?
   
   refer to: https://github.com/apache/apisix/discussions/9487#discussion-5199631
   
   ### Environment
   
   - APISIX version: `3.1.0`
   - Operating system: `Linux gateway-5667d89f79-vl75g 5.4.164-1.el7.elrepo.x86_64 #1 SMP Mon Dec 6 12:28:33 EST 2021 x86_64 GNU/Linux`
   - OpenResty / Nginx version: `nginx version: openresty/1.21.4.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.apache.org

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


[GitHub] [apisix] ronething commented on issue #9544: help request: How to set the upstream host dynamically

Posted by "ronething (via GitHub)" <gi...@apache.org>.
ronething commented on issue #9544:
URL: https://github.com/apache/apisix/issues/9544#issuecomment-1562369035

   Can you show how to reproduce 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


Re: [I] help request: How to set the upstream host dynamically [apisix]

Posted by "br41n10 (via GitHub)" <gi...@apache.org>.
br41n10 commented on issue #9544:
URL: https://github.com/apache/apisix/issues/9544#issuecomment-2050976794

   I have the same problem, and I write a custom plugin to achieve this. 
   
   checkout my gits: https://gist.github.com/br41n10/e2d378c7a04d4861b2f0cbf4d2476d71
   
   This is a very basic implementation, modify on your needs.


-- 
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] qihaiyan commented on issue #9544: help request: How to set the upstream host dynamically

Posted by "qihaiyan (via GitHub)" <gi...@apache.org>.
qihaiyan commented on issue #9544:
URL: https://github.com/apache/apisix/issues/9544#issuecomment-1569351394

   > @qihaiyan I tried the `traffic-split`, it can't dynamically assign value to upstream_host according to the URI regexp.
   
   Maybe you should develop your own plugin with reference to traffic-split.


-- 
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] Revolyssup commented on issue #9544: help request: How to set the upstream host dynamically

Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #9544:
URL: https://github.com/apache/apisix/issues/9544#issuecomment-1563808162

   > > Can you show how to reproduce it?
   > 
   > It's not a bug report, I just want to do the above-mentioned function, need some help, thank you!
   
   Can you show an example config of route that you tried with which didn't work?


-- 
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] KamenRiderKuuga commented on issue #9544: help request: How to set the upstream host dynamically

Posted by "KamenRiderKuuga (via GitHub)" <gi...@apache.org>.
KamenRiderKuuga commented on issue #9544:
URL: https://github.com/apache/apisix/issues/9544#issuecomment-1564095249

   > > > Can you show how to reproduce it?
   > > 
   > > 
   > > It's not a bug report, I just want to do the above-mentioned function, need some help, thank you!
   > 
   > Can you show an example config of route that you tried with which didn't work?
   
   No example configuration now.
   
   I want to set the request regexp like this:
   
   ![image](https://github.com/apache/apisix/assets/39508075/7d2435ce-798e-467b-8326-f2645aaf1db1)
   
   In this way, when requesting `/api/data-manage/users`, the `http://data-manage/api/data-manage/users` will be requested


-- 
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] KamenRiderKuuga commented on issue #9544: help request: How to set the upstream host dynamically

Posted by "KamenRiderKuuga (via GitHub)" <gi...@apache.org>.
KamenRiderKuuga commented on issue #9544:
URL: https://github.com/apache/apisix/issues/9544#issuecomment-1562394373

   > Can you show how to reproduce it?
   
   It's not a bug report, I just want to do the above-mentioned function, need some help, thank you!


-- 
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] qihaiyan commented on issue #9544: help request: How to set the upstream host dynamically

Posted by "qihaiyan (via GitHub)" <gi...@apache.org>.
qihaiyan commented on issue #9544:
URL: https://github.com/apache/apisix/issues/9544#issuecomment-1563912846

   try the traffic-split plugin @KamenRiderKuuga 


-- 
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] KamenRiderKuuga commented on issue #9544: help request: How to set the upstream host dynamically

Posted by "KamenRiderKuuga (via GitHub)" <gi...@apache.org>.
KamenRiderKuuga commented on issue #9544:
URL: https://github.com/apache/apisix/issues/9544#issuecomment-1564096785

   > try the traffic-split plugin @KamenRiderKuuga
   
   Thanks, I'll try 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] KamenRiderKuuga commented on issue #9544: help request: How to set the upstream host dynamically

Posted by "KamenRiderKuuga (via GitHub)" <gi...@apache.org>.
KamenRiderKuuga commented on issue #9544:
URL: https://github.com/apache/apisix/issues/9544#issuecomment-1568715231

   @qihaiyan I tried the `traffic-split`, it can't dynamically assign value to upstream_host according to the URI regexp


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


Re: [I] help request: How to set the upstream host dynamically [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #9544:
URL: https://github.com/apache/apisix/issues/9544#issuecomment-1999749236

   this is not supported.


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