You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "ventaubain (via GitHub)" <gi...@apache.org> on 2023/10/16 14:04:27 UTC
[I] help request: How works load balancing with Apisix service in a meshed cluster (linkerd) [apisix]
ventaubain opened a new issue, #10344:
URL: https://github.com/apache/apisix/issues/10344
### Description
I have a cluster with services meshed by linkerd. Load balancing can be done by Apisix ingress and/or linkerd but I don't know how both can collaborate.
Linkerd load balancing description:
`For destinations that are in Kubernetes, Linkerd will look up the IP address in the Kubernetes API. If the IP address corresponds to a Service, Linkerd will load balance across the endpoints of that Service and apply any policy from that Service’s [Service Profile](https://linkerd.io/2.14/features/service-profiles/). On the other hand, if the IP address corresponds to a Pod, Linkerd will not perform any load balancing or apply any [Service Profiles](https://linkerd.io/2.14/features/service-profiles/).`
Apisix does load balancing with `ApisixUpstream`
`ApisixUpstream is a Kubernetes CRD object that abstracts out a Kubernetes service and makes it richer by adding load balancing, health check, retry, and timeouts. It is designed to have the same name as the Kubernetes service.`
So, with these definitions, Linkerd applies load balancing when requests are sent to a Service and Apisix abstracts a Service and this one does load balancing. What will be the comportment of the request according this architecture ?
### Environment
- APISIX version (run `apisix version`):
- Operating system (run `uname -a`):
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
--
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
Re: [I] help request: How works load balancing with Apisix custom-service in a meshed cluster (linkerd) [apisix]
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #10344:
URL: https://github.com/apache/apisix/issues/10344#issuecomment-1766704441
> Thanks for your response @Revolyssup ! But, I'm not sure to completly understand. In my config, I have Apisix (ingress mode) meshed in the Linkerd network to have the mTLS for upstream connections (North-South). So, when a request comes from outside to the Apisix Ingress, the load balancing is exclusively managed by ApisixUpstream configuration ? And this one simiulates a "K8S Service" not handled by Linkerd ?
Do you have the linkerd sidecar container in the APISIX pod as well?
--
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 works load balancing with Apisix custom-service in a meshed cluster (linkerd) [apisix]
Posted by "ventaubain (via GitHub)" <gi...@apache.org>.
ventaubain commented on issue #10344:
URL: https://github.com/apache/apisix/issues/10344#issuecomment-1876714799
@monkeyDluffy6017 Sorry for the delay !
For information if someone interested, I have solved my problem by using Service resolution granularity configuration (resolveGranularity variable in ApisixRoute config). It permits to choose if we forward the request to pods or Service.
--
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 works load balancing with Apisix custom-service in a meshed cluster (linkerd) [apisix]
Posted by "ventaubain (via GitHub)" <gi...@apache.org>.
ventaubain commented on issue #10344:
URL: https://github.com/apache/apisix/issues/10344#issuecomment-1765764613
Thanks for your response @Revolyssup ! But, I'm not sure to completly understand. In my config, I have Apisix (ingress mode) meshed in the Linkerd network to have the mTLS for upstream connections (North-South). So, when a request comes from outside to the Apisix Ingress, the load balancing is exclusively managed by ApisixUpstream configuration ? And this one simiulates a "K8S Service" not handled by Linkerd ?
--
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 works load balancing with Apisix custom-service in a meshed cluster (linkerd) [apisix]
Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 commented on issue #10344:
URL: https://github.com/apache/apisix/issues/10344#issuecomment-1851490345
@ventaubain have you solved your problem?
--
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 works load balancing with Apisix custom-service in a meshed cluster (linkerd) [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #10344:
URL: https://github.com/apache/apisix/issues/10344#issuecomment-1764682071
@Revolyssup any help here?
--
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 works load balancing with Apisix custom-service in a meshed cluster (linkerd) [apisix]
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #10344:
URL: https://github.com/apache/apisix/issues/10344#issuecomment-1770174461
Though it should not be a problem because the upstreams configured in APISIX will be the exact pod IPs so linkerd's traffic management based on Service won't disturb it. @ventaubain . So theoretically they can work together but I still would not recommend it. Because APISIX's routing is not really guaranteed as the traffic goes through the sidecar. There maybe edge cases and unexpected behaviour that I can just yet no predict. You can maybe take APISIX out of the mesh.
--
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 works load balancing with Apisix custom-service in a meshed cluster (linkerd) [apisix]
Posted by "ventaubain (via GitHub)" <gi...@apache.org>.
ventaubain closed issue #10344: help request: How works load balancing with Apisix custom-service in a meshed cluster (linkerd)
URL: https://github.com/apache/apisix/issues/10344
--
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 works load balancing with Apisix custom-service in a meshed cluster (linkerd) [apisix]
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #10344:
URL: https://github.com/apache/apisix/issues/10344#issuecomment-1765200468
@ventaubain They have different use cases.
Linkerd transparently injects sidecars, Apisix pod is separate.
So for Linkerd, your Cluster's traffic is transparently routed through the configured sidecars and this is useful for east-west traffic.
Apisix on the other hand is used as Ingress, the entrypoint of traffic. This is mainly useful for North-South traffic. For the traffic coming from outside to inside.
You can use both. Linkerd's configuration won't effect APISIX for traffic that doesn't go through apisix ingress gateway.
--
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 works load balancing with Apisix custom-service in a meshed cluster (linkerd) [apisix]
Posted by "ventaubain (via GitHub)" <gi...@apache.org>.
ventaubain commented on issue #10344:
URL: https://github.com/apache/apisix/issues/10344#issuecomment-1770207002
Ok thanks for your response @Revolyssup ! The user has the possibility to choose between APisix and Linkerd for the routing policy or not ? In others words, in the case where the user want give the control to Linkerd, there is a config to ask to Apisix to use the service's Cluster IP and port to not bypass Linkerd routing (like the `nginx.ingress.kubernetes.io/service-upstream`parameters of Nginx ingress) ? Or it is out-of-scope ?
--
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 works load balancing with Apisix custom-service in a meshed cluster (linkerd) [apisix]
Posted by "ventaubain (via GitHub)" <gi...@apache.org>.
ventaubain commented on issue #10344:
URL: https://github.com/apache/apisix/issues/10344#issuecomment-1770152699
I have `linkerd.io/inject: enabled` in my namespace declaration where apisix is deployed so, normally, yes.
--
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