{"id":1314,"date":"2023-06-20T04:32:44","date_gmt":"2023-06-20T04:32:44","guid":{"rendered":"https:\/\/imesh.ai\/blog\/?p=1314"},"modified":"2024-08-20T05:56:47","modified_gmt":"2024-08-20T05:56:47","slug":"what-are-istio-virtual-services-and-destination-rules","status":"publish","type":"post","link":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/","title":{"rendered":"What are Istio Virtual Services and Destination Rules?"},"content":{"rendered":"\n<p>It makes sense for DevOps engineers and architects to perform <a href=\"https:\/\/imesh.ai\/blog\/what-is-canary-deployment-in-ci-cd\/\" target=\"_blank\" rel=\"noreferrer noopener\">canary deployments in their CI\/CD workflows<\/a>. They cannot skip testing a release for the sake of adhering to continuous delivery practices, can they?<\/p>\n\n\n\n<p>In canary deployments, the new version, called canary, is tested with limited live traffic at first. Ops teams and SREs then observe and analyze the performance and customer experience of the canary, before gradually rolling it out for the larger audience in case of no issues.<\/p>\n\n\n\n<p>The crucial part of a canary deployment is to split the live traffic and route a small portion of it to the canary. Architects and DevOps teams need the best tool to carry out such traffic splitting between services. Of course, <a href=\"https:\/\/imesh.ai\/blog\/introduction-to-api-gateway-in-microservices-architecture\/\" target=\"_blank\" rel=\"noreferrer noopener\">API gateways<\/a> can do it. But it is difficult to split traffic between internal services or subsets with API gateways.<\/p>\n\n\n\n<p>This is where the open-source <a href=\"https:\/\/imesh.ai\/blog\/what-is-istio\/\" target=\"_blank\" rel=\"noreferrer noopener\">Istio service mesh<\/a> comes in. Istio provides 5 traffic management API resources to handle traffic from the edge and also between service subsets:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Virtual services<\/li>\n\n\n\n<li>Destination rules<\/li>\n\n\n\n<li>Gateways<\/li>\n\n\n\n<li>Service entries<\/li>\n\n\n\n<li>Sidecars<\/li>\n<\/ul>\n\n\n\n<p>Out of all the above resources, virtual services and destination rules form the core of Istio\u2019s traffic routing features. Canary deployment is just one of the use cases they provide. Let us explore the resources, like what virtual services and destination rules are, and how they work.<\/p>\n\n\n\n<p>But before we begin, let us understand how Istio routes and load balance traffic by default.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A quick introduction to Istio Envoy proxy load balancing<\/h2>\n\n\n\n<p>Istio uses <a href=\"https:\/\/imesh.ai\/blog\/what-is-envoy-proxy\/\" target=\"_blank\" rel=\"noreferrer noopener\">Envoy proxy<\/a> as its data plane. Envoy proxy runs as a sidecar container with each application pod and intercepts the traffic going in and out of the pod.<\/p>\n\n\n\n<p>Istio\u2019s Envoy proxy uses the least requests model to load balance traffic by default. That means, two random service instances (pods) are selected from a service\u2019s load balancing pool (or replicas) and the traffic is routed to the pod that has fewer active requests to serve. This prevents service instances or pods from request overloading and ensures effective utilization of resources.<\/p>\n\n\n\n<p>Istio works fine with the default load-balancing model. However, there are circumstances where you want to configure certain rules. For example, consider the below scenarios:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You want to change the default routing policy into a weighted or round-robin model.<br><\/li>\n\n\n\n<li>You want to limit the number of simultaneous connections or requests to upstream services.<br><\/li>\n\n\n\n<li>You want to set an outlier detection policy to eject unhealthy pods for a certain amount of time to keep the infrastructure resilient.<br><\/li>\n\n\n\n<li>You would like to A\/B test between two versions of services \u2014 split traffic and route a certain percentage of them to the new version.<\/li>\n<\/ul>\n\n\n\n<p>These are some instances where DevOps and cloud architects can use `VirtualServices` and `DestinationRules`.<\/p>\n\n\n<!-- Ad space powered by WP AdCenter v2.5.7 - https:\/\/wpadcenter.com\/ --><div class=\"wpadcenter-ad-container\" ><div id=\"wpadcenter-ad-1679\" class=\"ad-970x250 wpadcenter-970x250 ad-placement  wpadcenter-alignnone alignnone\"><div class=\"wpadcenter-ad-inner\" ><a id=\"wpadcenter_ad\" data-value=1679 data-placement=\"\" href=\"https:\/\/imesh.ai\/pricing.html\" target=\"_self\" class=\"wpadcenter-ad-inner__item\" ><img fetchpriority=\"high\" decoding=\"async\" width=\"970\" height=\"250\" src=\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/10\/IMESH-Istio-Get-Pricing-1-5.png\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"IMESH Istio Get Pricing\" srcset=\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/10\/IMESH-Istio-Get-Pricing-1-5.png 970w, https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/10\/IMESH-Istio-Get-Pricing-1-5-300x77.png 300w, https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/10\/IMESH-Istio-Get-Pricing-1-5-768x198.png 768w, https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/10\/IMESH-Istio-Get-Pricing-1-5-400x103.png 400w, https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/10\/IMESH-Istio-Get-Pricing-1-5-800x206.png 800w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/a><\/div><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">What are Istio virtual services?<\/h2>\n\n\n\n<p>Istio virtual service is a Kubernetes custom resource definition (CRD) that defines the routing rules for traffic within a mesh. Virtual service routes requests to respective destinations if they meet the matching criteria defined in the `VirtualService` YAML file.&nbsp;<\/p>\n\n\n\n<p>The matching conditions can be applied to any parameters in the HTTP messages, such as URIs, traffic ports, header fields, etc. Istio virtual service resource supports HTTP\/1.1, HTTP2, and gRPC traffic.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Sample VirtualService YAML<\/h3>\n\n\n\n<p>The below `VirtualService` YAML will route traffic with the URIs `\/istio-support` and `\/istio-implementation` addressing the host `imeshi.ai`, to `istio-support` and `istio-implementation` services, respectively.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>apiVersion: networking.istio.io\/v1beta1\nkind: VirtualService\nmetadata:\n&nbsp; name: imesh-route\nspec:\n&nbsp; hosts:\n&nbsp; &nbsp; - imesh.ai\n&nbsp; http:\n&nbsp; - match:\n&nbsp; &nbsp; - uri:\n&nbsp; &nbsp; &nbsp; &nbsp; prefix: \/istio-support\n&nbsp; &nbsp; route:\n&nbsp; &nbsp; - destination:\n&nbsp; &nbsp; &nbsp; &nbsp; host: istio-support\n&nbsp; - match:\n&nbsp; &nbsp; - uri:\n&nbsp; &nbsp; &nbsp; &nbsp; prefix: \/istio-implementation\n&nbsp; &nbsp; route:\n&nbsp; &nbsp; - destination:\n&nbsp; &nbsp; &nbsp; &nbsp; host: istio-implementation<\/code><\/pre>\n\n\n\n<p>Below are some parameters for virtual service resources to create the rules for runtime traffic:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>hosts:<\/strong> In the YAML, `hosts` field is the destination host (DNS name, IP address, or FQDN) that the routing rules apply to. The `hosts` is set to `imesh.ai` in the above example, so the `VirtualService` will only apply to requests addressing that host.<br><\/li>\n\n\n\n<li><strong>http:<\/strong> The `http` section defines the virtual service\u2019s routing rules for traffic to `hosts`. It contains the match conditions and the destination where the traffic should go based on those conditions. Apart from HTTP, virtual services can route TCP and unterminated TLS traffic.<br><\/li>\n\n\n\n<li><strong>match:<\/strong> The `match` field sets conditions that the incoming request has to satisfy for it to be routed to the destination service. This can be based on URIs, HTTP headers, methods, source IP addresses, etc. Here, the `match` has `uri` subfields with `prefix` attributes that match the URIs of incoming requests, which are `\/istio-support` and `\/istio-implementation` respectively.<br><\/li>\n\n\n\n<li><strong>destination: <\/strong>The `destination` defined under the `route` section specifies the actual destination for traffic that matches the respective conditions. For effective traffic distribution, the destination service should exist in Istio\u2019s service registry, either by default (Envoy proxy) or added using a service entry. The destination can also be a service subset.<\/li>\n<\/ul>\n\n\n\n<p>The above fields show only a gist of routing rules that DevOps and cloud engineers can configure with virtual services. To see the comprehensive list, head to <a href=\"https:\/\/istio.io\/latest\/docs\/reference\/config\/networking\/virtual-service\/#VirtualService\" target=\"_blank\" rel=\"noreferrer noopener\">Istio \/ Virtual Service<\/a>.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What are Istio destination rules?<\/h2>\n\n\n\n<p>Istio destination rule is another Kubernetes CRD that defines rules for the traffic routed after evaluating virtual service configurations. In other words, `DestinationRule` defines what happens to the traffic routed to a given destination. Destination rules let users customize the following traffic policies of Envoy proxy:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Load balancing model<\/li>\n\n\n\n<li>Connection pool size from the sidecar<\/li>\n\n\n\n<li>Outlier detection settings<\/li>\n\n\n\n<li>TLS security mode<\/li>\n\n\n\n<li>Circuit breaking settings<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Sample DestinationRule YAML<\/h3>\n\n\n\n<p>We configured the above `VirtualService` to route requests to `imesh.ai\/istio-support` to `istio-support` service. Assuming that we have two subsets of `istio-support` deployed, then this is how the `DestinationRule` YAML would look like:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>apiVersion: networking.istio.io\/v1beta1\nkind: DestinationRule\nmetadata:\n&nbsp; name: istio-support-destination\nspec:\n&nbsp; host: istio-support\n&nbsp; subsets:\n&nbsp; - name: istio-support-v1\nlabels:\n&nbsp; &nbsp; version: v1\n&nbsp; - name: istio-support-v2\nlabels:\n&nbsp; &nbsp; version: v2\n&nbsp; trafficPolicy:\n&nbsp; &nbsp; &nbsp; loadBalancer:\n&nbsp; &nbsp; &nbsp; &nbsp; simple: ROUND_ROBIN<\/code><\/pre>\n\n\n\n<p>The traffic to `istio-support` service will load balance between the two subsets (`istio-support-v1` and `istio-support-v2`) using the round robin algorithm, given that they are mentioned in the corresponding `VirtualService` since the routing is defined there.<\/p>\n\n\n\n<p>Typically, both virtual services and destination rules work together to apply policies and send traffic to their respective destinations. But sometimes, they do not need each other:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the service has only one version and there are no granular routing requirements such as load balancing policy, connection pool settings, etc., `VirtualService` alone will be enough.<br><\/li>\n\n\n\n<li>`DestinationRule` independently is sufficient if you only need to apply traffic policies like load balancing policy or circuit breaking to specific services.<\/li>\n<\/ul>\n\n\n<!-- Ad space powered by WP AdCenter v2.5.7 - https:\/\/wpadcenter.com\/ --><div class=\"wpadcenter-ad-container\" ><div id=\"wpadcenter-ad-1493\" class=\" ad-placement  wpadcenter-alignnone alignnone\"><div class=\"wpadcenter-ad-inner\" ><a id=\"wpadcenter_ad\" data-value=1493 data-placement=\"\" href=\"https:\/\/imesh.ai\/transform-network-and-traffic-with-istio.html?utm_source=Click&utm_medium=banner-ebook&utm_campaign=Istio+Virtual+Services&utm_term=download+ebook+here\" target=\"_self\" class=\"wpadcenter-ad-inner__item\" ><img decoding=\"async\" width=\"641\" height=\"124\" src=\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/08\/Download-the-ebook.png\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" srcset=\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/08\/Download-the-ebook.png 641w, https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/08\/Download-the-ebook-300x58.png 300w, https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/08\/Download-the-ebook-400x77.png 400w\" sizes=\"(max-width: 641px) 100vw, 641px\" \/><\/a><\/div><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">How do virtual services and destination rules work?<\/h2>\n\n\n\n<p>The control plane component of Istio, called istiod, applies virtual services and destination rules to all data plane proxies by default. However, note that <strong>it is the Envoy proxy at the source which controls the routing rules and not the one at the destination<\/strong>.<\/p>\n\n\n\n<p>For example, if the traffic coming from `UI` service (`pod A`) to `product` service (`pod 2`) needs to have retry logic configured (refer to the image below), the proxy of `pod A` controls this configured behavior, not the proxy of `pod 2`.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"960\" height=\"540\" data-id=\"1316\" src=\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/p1-traffic-between-services-in-an-istio-enabled-namespace.png\" alt=\"Traffic between services in an istio-enabled namespace\" class=\"wp-image-1316\" srcset=\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/p1-traffic-between-services-in-an-istio-enabled-namespace.png 960w, https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/p1-traffic-between-services-in-an-istio-enabled-namespace-300x169.png 300w, https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/p1-traffic-between-services-in-an-istio-enabled-namespace-768x432.png 768w, https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/p1-traffic-between-services-in-an-istio-enabled-namespace-400x225.png 400w, https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/p1-traffic-between-services-in-an-istio-enabled-namespace-800x450.png 800w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>Many DevOps and cloud engineers who try to understand virtual services and destination rules fall into the trap of believing that they are controlled by the destination proxy. But if you look at why it is not the case, it is all very logical:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The sidecar proxy of `pod 2` is only aware of its own application container, `pod 2`. It is not aware of the containers of `pod 1` or `pod 3`. So if the request to `pod 2` keeps on failing, `pod 1` or `pod 3` still will not serve that request.<br><br>In the case of `UI` service, it sits outside `product` service\u2019s cluster and is fully aware of the services (`pod 1`, `pod 2`, `pod 3`) in the cluster. (Note that cluster here means a set of similar services, not Kubernetes cluster.) So, `UI` service\u2019s proxy can route traffic to `pod 1` or `pod 3` when a request to `pod 2` fails.<br><\/li>\n\n\n\n<li>Almost similar is the case if you configure traffic splitting between services. For example, if you want 25% of the traffic from the `UI` to go to `pod 1` and 10% to `pod 2`, Envoy proxies of the `UI` pods control that rule.<br><br>The proxy of `pod 2` cannot do anything because it is the destination and the traffic has already reached there. It cannot forward the traffic to other service instances. At the same time, `UI` service\u2019s pods that sit outside can see and control the behavior of traffic to the cluster, including forwarding requests based on weights.<br><\/li>\n\n\n\n<li>The same happens with routing to subsets (in the least-request load balancing model, for example) using `DestinationRule`. To send traffic to subsets with the least active requests, the proxy needs to monitor traffic to the pods in the cluster. And it can only be done by the proxy outside the cluster.<br><\/li>\n\n\n\n<li>Now, assume that there is a new service called `reviews`. It is not deployed in an Istio-enabled namespace and thus does not have a sidecar proxy. If `reviews` sends traffic to an Istio-enabled service, you cannot configure any routing rules on the requests since the source does not have the proxy to apply virtual services or destination rules.<\/li>\n<\/ul>\n\n\n\n<p>Always remember: <strong>Envoy proxy at the source controls the routing rules, not the one at the destination.<\/strong><\/p>\n\n\n\n<p>(If you are interested to see a demo of how to implement canary using Istio, check this out: <a href=\"https:\/\/imesh.ai\/blog\/how-to-implement-canary-for-kubernetes-apps-using-istio\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to implement Canary for Kubernetes apps using Istio<\/a>)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Features and use cases of Istio virtual services and destination rules<\/h2>\n\n\n\n<p>Virtual services and destination rules help in applying granular routing rules. Besides, they provide features to test and ensure network resiliency, so that applications operate reliably.<\/p>\n\n\n\n<p>Below are some features and use cases of virtual services and destination rule:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Canary deployments<\/li>\n\n\n\n<li>Blue\/green deployments<\/li>\n\n\n\n<li>Timeouts<\/li>\n\n\n\n<li>Retries<\/li>\n\n\n\n<li>Fault injection<\/li>\n\n\n\n<li>Circuit breakers<\/li>\n\n\n\n<li>Mirroring<\/li>\n<\/ul>\n\n\n\n<p>We have covered each of them here: <a href=\"https:\/\/imesh.ai\/blog\/traffic-management-and-network-resiliency-with-istio-service-mesh\/\" target=\"_blank\" rel=\"noreferrer noopener\">Traffic Management and Network Resiliency with Istio Service Mesh<\/a>. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">About IMESH<\/h2>\n\n\n\n<p><a href=\"http:\/\/imesh.ai\" target=\"_blank\" rel=\"noreferrer noopener\">IMESH<\/a> helps enterprises adopt Istio and Envoy without any implementation or operational hassle. By implementing Istio for your cloud applications from day 1, we save DevOps and cloud architects from hours of toil and experimentation to learn Istio.<\/p>\n\n\n\n<p><a href=\"https:\/\/imesh.ai\/istio-enterprise-consulting.html?utm_source=Click&amp;utm_medium=Blog&amp;utm_campaign=Istio+Virtual+Services&amp;utm_term=Book+a+free+30-mins+consultation\">Book a free 30-mins consultation<\/a> with one of our Istio experts, or <a href=\"https:\/\/imesh.ai\/contact-us.html?utm_source=click&amp;utm_medium=text&amp;utm_campaign=contact_page&amp;utm_id=Contact+us&amp;utm_term=promotion&amp;utm_content=Istio+Virtual+Services+and+Destination+Rules\">contact us<\/a> if you need enterprise Istio support.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/istio.io\/latest\/docs\/concepts\/traffic-management\/\" target=\"_blank\" rel=\"noreferrer noopener\">Istio \/ Traffic Management<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/istio.io\/latest\/docs\/reference\/config\/networking\/virtual-service\/\" target=\"_blank\" rel=\"noreferrer noopener\">Istio \/ Virtual Service<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/istio.io\/latest\/docs\/reference\/config\/networking\/destination-rule\/#DestinationRule\" target=\"_blank\" rel=\"noreferrer noopener\">Istio \/ Destination Rule<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>It makes sense for DevOps engineers and architects to perform canary deployments<span class=\"excerpt-more\"><\/span><\/p>\n","protected":false},"author":10,"featured_media":1317,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,38,52],"tags":[55,53,57,56,54],"class_list":["post-1314","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-istio-service-mesh","category-network","category-traffic-management-api-resources","tag-destination-rules","tag-istio","tag-kubernetes","tag-traffic-management","tag-virtual-services"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What are Istio Virtual Services and Destination Rules?<\/title>\n<meta name=\"description\" content=\"Virtual services and destination rules are two Kubernetes objects that form the core of traffic management in Istio. Learn what they are and how they work.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What are Istio Virtual Services and Destination Rules?\" \/>\n<meta property=\"og:description\" content=\"Virtual services and destination rules are two Kubernetes objects that form the core of traffic management in Istio. Learn what they are and how they work.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/\" \/>\n<meta property=\"og:site_name\" content=\"IMESH\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-20T04:32:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-20T05:56:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/Featured-Images-for-blogs-and-webinars.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pulak Das\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pulak Das\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/\"},\"author\":{\"name\":\"Pulak Das\",\"@id\":\"https:\/\/imesh.ai\/blog\/#\/schema\/person\/13792df637b7c676b353e85f12d3f6c1\"},\"headline\":\"What are Istio Virtual Services and Destination Rules?\",\"datePublished\":\"2023-06-20T04:32:44+00:00\",\"dateModified\":\"2024-08-20T05:56:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/\"},\"wordCount\":1670,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/imesh.ai\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/Featured-Images-for-blogs-and-webinars.png\",\"keywords\":[\"destination rules\",\"istio\",\"kubernetes\",\"traffic management\",\"virtual services\"],\"articleSection\":[\"Istio service mesh\",\"Network\",\"Traffic management API resources\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/\",\"url\":\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/\",\"name\":\"What are Istio Virtual Services and Destination Rules?\",\"isPartOf\":{\"@id\":\"https:\/\/imesh.ai\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/Featured-Images-for-blogs-and-webinars.png\",\"datePublished\":\"2023-06-20T04:32:44+00:00\",\"dateModified\":\"2024-08-20T05:56:47+00:00\",\"description\":\"Virtual services and destination rules are two Kubernetes objects that form the core of traffic management in Istio. Learn what they are and how they work.\",\"breadcrumb\":{\"@id\":\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#primaryimage\",\"url\":\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/Featured-Images-for-blogs-and-webinars.png\",\"contentUrl\":\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/Featured-Images-for-blogs-and-webinars.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/imesh.ai\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What are Istio Virtual Services and Destination Rules?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/imesh.ai\/blog\/#website\",\"url\":\"https:\/\/imesh.ai\/blog\/\",\"name\":\"IMESH Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/imesh.ai\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/imesh.ai\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/imesh.ai\/blog\/#organization\",\"name\":\"IMESH\",\"url\":\"https:\/\/imesh.ai\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/imesh.ai\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/03\/IMESH-LOGO-scaled.jpg\",\"contentUrl\":\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/03\/IMESH-LOGO-scaled.jpg\",\"width\":2560,\"height\":1665,\"caption\":\"IMESH\"},\"image\":{\"@id\":\"https:\/\/imesh.ai\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/imeshai\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/imesh.ai\/blog\/#\/schema\/person\/13792df637b7c676b353e85f12d3f6c1\",\"name\":\"Pulak Das\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/imesh.ai\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/03\/IMG_20230222_170121-150x150.jpg\",\"contentUrl\":\"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/03\/IMG_20230222_170121-150x150.jpg\",\"caption\":\"Pulak Das\"},\"description\":\"Pulak is the Istio and Envoy expert in IMESH. He is a front-end developer passionate about open-source software, design, and typography. His scientific interests as a computer science graduate are at the systems level: operating systems and programming languages.\",\"sameAs\":[\"https:\/\/imesh.ai\"],\"url\":\"https:\/\/imesh.ai\/blog\/author\/pulak-dasimesh-ai\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What are Istio Virtual Services and Destination Rules?","description":"Virtual services and destination rules are two Kubernetes objects that form the core of traffic management in Istio. Learn what they are and how they work.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/","og_locale":"en_US","og_type":"article","og_title":"What are Istio Virtual Services and Destination Rules?","og_description":"Virtual services and destination rules are two Kubernetes objects that form the core of traffic management in Istio. Learn what they are and how they work.","og_url":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/","og_site_name":"IMESH","article_published_time":"2023-06-20T04:32:44+00:00","article_modified_time":"2024-08-20T05:56:47+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/Featured-Images-for-blogs-and-webinars.png","type":"image\/png"}],"author":"Pulak Das","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pulak Das","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#article","isPartOf":{"@id":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/"},"author":{"name":"Pulak Das","@id":"https:\/\/imesh.ai\/blog\/#\/schema\/person\/13792df637b7c676b353e85f12d3f6c1"},"headline":"What are Istio Virtual Services and Destination Rules?","datePublished":"2023-06-20T04:32:44+00:00","dateModified":"2024-08-20T05:56:47+00:00","mainEntityOfPage":{"@id":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/"},"wordCount":1670,"commentCount":0,"publisher":{"@id":"https:\/\/imesh.ai\/blog\/#organization"},"image":{"@id":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#primaryimage"},"thumbnailUrl":"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/Featured-Images-for-blogs-and-webinars.png","keywords":["destination rules","istio","kubernetes","traffic management","virtual services"],"articleSection":["Istio service mesh","Network","Traffic management API resources"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/","url":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/","name":"What are Istio Virtual Services and Destination Rules?","isPartOf":{"@id":"https:\/\/imesh.ai\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#primaryimage"},"image":{"@id":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#primaryimage"},"thumbnailUrl":"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/Featured-Images-for-blogs-and-webinars.png","datePublished":"2023-06-20T04:32:44+00:00","dateModified":"2024-08-20T05:56:47+00:00","description":"Virtual services and destination rules are two Kubernetes objects that form the core of traffic management in Istio. Learn what they are and how they work.","breadcrumb":{"@id":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#primaryimage","url":"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/Featured-Images-for-blogs-and-webinars.png","contentUrl":"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/Featured-Images-for-blogs-and-webinars.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/imesh.ai\/blog\/what-are-istio-virtual-services-and-destination-rules\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/imesh.ai\/blog\/"},{"@type":"ListItem","position":2,"name":"What are Istio Virtual Services and Destination Rules?"}]},{"@type":"WebSite","@id":"https:\/\/imesh.ai\/blog\/#website","url":"https:\/\/imesh.ai\/blog\/","name":"IMESH Blog","description":"","publisher":{"@id":"https:\/\/imesh.ai\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/imesh.ai\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/imesh.ai\/blog\/#organization","name":"IMESH","url":"https:\/\/imesh.ai\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imesh.ai\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/03\/IMESH-LOGO-scaled.jpg","contentUrl":"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/03\/IMESH-LOGO-scaled.jpg","width":2560,"height":1665,"caption":"IMESH"},"image":{"@id":"https:\/\/imesh.ai\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/imeshai"]},{"@type":"Person","@id":"https:\/\/imesh.ai\/blog\/#\/schema\/person\/13792df637b7c676b353e85f12d3f6c1","name":"Pulak Das","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imesh.ai\/blog\/#\/schema\/person\/image\/","url":"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/03\/IMG_20230222_170121-150x150.jpg","contentUrl":"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/03\/IMG_20230222_170121-150x150.jpg","caption":"Pulak Das"},"description":"Pulak is the Istio and Envoy expert in IMESH. He is a front-end developer passionate about open-source software, design, and typography. His scientific interests as a computer science graduate are at the systems level: operating systems and programming languages.","sameAs":["https:\/\/imesh.ai"],"url":"https:\/\/imesh.ai\/blog\/author\/pulak-dasimesh-ai\/"}]}},"jetpack_featured_media_url":"https:\/\/imesh.ai\/blog\/wp-content\/uploads\/2023\/06\/Featured-Images-for-blogs-and-webinars.png","_links":{"self":[{"href":"https:\/\/imesh.ai\/blog\/wp-json\/wp\/v2\/posts\/1314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/imesh.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/imesh.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/imesh.ai\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/imesh.ai\/blog\/wp-json\/wp\/v2\/comments?post=1314"}],"version-history":[{"count":25,"href":"https:\/\/imesh.ai\/blog\/wp-json\/wp\/v2\/posts\/1314\/revisions"}],"predecessor-version":[{"id":2124,"href":"https:\/\/imesh.ai\/blog\/wp-json\/wp\/v2\/posts\/1314\/revisions\/2124"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/imesh.ai\/blog\/wp-json\/wp\/v2\/media\/1317"}],"wp:attachment":[{"href":"https:\/\/imesh.ai\/blog\/wp-json\/wp\/v2\/media?parent=1314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imesh.ai\/blog\/wp-json\/wp\/v2\/categories?post=1314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imesh.ai\/blog\/wp-json\/wp\/v2\/tags?post=1314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}