I have deployed a multi-cluster application on GKE using Anthos Service Mesh, but I have some doubt about the available options, their pro and cons. Both I have tested and are working, but need help to go further. We need some additional control of traffic between different cluster services, as we would like to deploy some service only in one cluster, because, for example, they are closer to the main DB that is deployed in one of the two regions. Example of the ideal configuration (simplified):
- Frontend service deployed in both clusters
- Api service deployed only in one cluster
- traffic from external load balancer routed to the nearest cluster Frontend service
- Both Frontends connect to the single Api instance
This is what I tried:
First solution (easy): deploy a MultiClusterService and a MultiClusterIngress to expose the services deployed in both GKE clusters to obtain a global load balancing with auto-route of traffic to the nearest cluster. Api service must be deployed in both clusters. This solution follow this sample
Second solution (harder): use istio-ingressgateway deployed in both clusters to expose services using VirtualService and DestinationRule Istio configurations, then expose the gateways behind global MultiClusterService and MultiClusterIngress. This kind of configuration comes from this sample.
The first solution, doesn't allow to manage fine-grain inter-cluster service traffic based on source, http headers etc., my solution was to deploy all services in both clusters and don't know how to manage routing from a service in one cluster to one in the other cluster (Frontend -> Api) (any tips about this?)
The second solution allow inter-services routing (using DestinationRule) but seems that traffic load balancing with auto-route to nearest cluster is missing, only round-robin, least connect and other options are available (see Istio LB options). The LocalityLBSetting seems to work but is really hard and boilerplate to configure with two regions and 6 zones and, again, the automatic route to the nearest cluster is missing. The source cluster label option (Istio Partitioning Service) isn't accepted by GKE because topology.istio.io/cluster is not valid, i don't know why.
Before spending a lot of time to find what's working or not, my questions are:
- Are "apiVersion: networking.istio.io/v1alpha3" configuration files used for Istio gateways, virtual services etc. still valid or are going to be deprecated from GKE in the future (see Istio on GKE deprecated after Sep. 2022)
- Are there other options not using basic Istio configurations to manage inter-service / inter-cluster communications using only global MultiClusterIngress as external LB and global routing?
I've read about Traffic Director that seems to be a new method to manage traffic about services, but can't understand how does it fit with Anthos, MCS, MCI and my configuration.
Any help will be appreciated. Thank you