{"id":275,"date":"2017-05-25T04:09:53","date_gmt":"2017-05-25T04:09:53","guid":{"rendered":"https:\/\/blog.ngocha.biz\/?p=275"},"modified":"2017-05-25T04:09:53","modified_gmt":"2017-05-25T04:09:53","slug":"istio-opensource-platform-microservices-management","status":"publish","type":"post","link":"https:\/\/blog.ngocha.biz\/?p=275","title":{"rendered":"What is Istio? What Does it Solve?"},"content":{"rendered":"<p><a href=\"https:\/\/istio.io\/?ref=devopscube.com\" rel=\"noreferrer\">Istio<\/a> started as a collaboration among three companies, Google, IBM,<strong> and Lyft <\/strong>to develop an open cloud service to connect, secure, manage and monitor a network of microservices regardless of platform, source or vendor.<\/p>\n<p>In this blog, you will learn what Istio is, why it is used, and the problems it solves like traffic management, security, observability, and service-to-service communication in Kubernetes.<\/p>\n<h2 id=\"what-is-istio\">What is Istio?<\/h2>\n<p><a href=\"https:\/\/devopscube.com\/what-is-docker\/\" rel=\"noopener noreferrer\">Containerization<\/a> has made microservices deployments simple and easier and the adoption of microservices is increasing day by day. Microservices architecture allows the developers to decouple a big application into smaller units and these smaller units talk to each other using API&#8217;s.<\/p>\n<p>Also, each microservice can be deployed by teams individually rather than waiting for the whole application to be developed for deployment.<\/p>\n<p>Managing these microservice on a large scale poses the following challenges <\/p>\n<ol>\n<li><strong>Discovering services &#8211; <\/strong>Finding a healthy service to route the traffic<\/li>\n<li><strong>Balancing the request load &#8211; <\/strong>Evenly distribute the traffic across services<\/li>\n<li><strong>Security &#8211; <\/strong>Ensuring the communication is encrypted and that the allowed services only communicate.<\/li>\n<li><strong>Controlling Traffic <\/strong>&#8211; Routing traffic to new services using methods such as Canary.<\/li>\n<li><strong>Handling Failures &#8211; <\/strong>Controlling retries for the failed requests and preventing failures.<\/li>\n<li><strong>Monitoring<\/strong> &#8211; Tracking the performance and failures by logs, metrics, and traces.<\/li>\n<\/ol>\n<p>Here is where Istio comes in to play.<\/p>\n<p>Istio helps us solve the difficulties by acting as an infrastructure layer to manage the communication between services. You can call it a service mesh.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-blue\">\n<div class=\"kg-callout-emoji\">\ud83d\udca1<\/div>\n<div class=\"kg-callout-text\">A <b><strong style=\"white-space: pre-wrap;\">service mesh<\/strong><\/b> is a dedicated <b><strong style=\"white-space: pre-wrap;\">infrastructure layer<\/strong><\/b> within the platform that manages<b><strong style=\"white-space: pre-wrap;\"> service-to-service communication<\/strong><\/b>.<\/div>\n<\/div>\n<p>Istio works very closely with the services using <strong>lightweight proxies<\/strong> to handle the traffic.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-yellow\">\n<div class=\"kg-callout-emoji\">\ud83d\udca1<\/div>\n<div class=\"kg-callout-text\">The original Istio architecture is Sidecar, which means a proxy runs alongside each pod. Recently, they have introduced a new method called Ambient Mode which does not run as sidecar.<\/div>\n<\/div>\n<p>Also, the only supported platform for Istio is <a href=\"https:\/\/devopscube.com\/kubernetes-architecture-explained\/\" rel=\"noreferrer\">Kubernetes<\/a>.<\/p>\n<h2 id=\"core-features-of-istio\">Core Features of Istio<\/h2>\n<p>The following are some of the important features of Istio.<\/p>\n<h3 id=\"1-traffic-control\">1. Traffic Control<\/h3>\n<p>Istio has the <strong>Custom Resource Definitions (CRDs)<\/strong> to configure the settings to define how the traffic should flow.<\/p>\n<p>The routing rules in Istio are configured using the <strong>Virtual Service<\/strong> Custom Resource.<\/p>\n<p>In Virtual Service, we can control the traffic based on.<\/p>\n<ol>\n<li>Host<\/li>\n<li>Path <\/li>\n<li>Headers <\/li>\n<li>Labels<\/li>\n<\/ol>\n<p>We can even split the traffic between different service versions to perform Canary or A\/B testing, which means we can control how much traffic should be routed to each service.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-blue\">\n<div class=\"kg-callout-emoji\">\ud83d\udca1<\/div>\n<div class=\"kg-callout-text\">We can perform <b><strong style=\"white-space: pre-wrap;\">chaos engineering<\/strong><\/b> using Istio&#8217;s <b><strong style=\"white-space: pre-wrap;\">fault injection<\/strong><\/b>. This allows us to add intentional delays and errors in requests to validate the stability and resilience of our system.<\/div>\n<\/div>\n<p>Another Custom Resource of the Istio is the <strong>Destination Rule, <\/strong>which allows us to configure the following settings.<\/p>\n<ol>\n<li><strong>Timeout<\/strong> &#8211; How long should we wait for a request to resolve<\/li>\n<li><strong>Retries<\/strong> &#8211; How many times does a request need to be retried for a failed request<\/li>\n<li><strong>Circuit Breaking<\/strong> &#8211; What should you do if a service endpoint is unhealthy.<\/li>\n<li><strong>Connection Pooling<\/strong> &#8211; How much traffic should be routed on a service.<\/li>\n<\/ol>\n<h3 id=\"2-security\">2. Security<\/h3>\n<p>Istio uses strong cryptographic identities to ensure secure and encrypted communication between the services. (Follows <strong>SPIFFE<\/strong> framework and X.509 certificates)<\/p>\n<p>Here, the Control Plane (Istiod) acts as a Certificate Authority (CA) to generate and manage the certificates. The data planes perform the mTLS handshake to ensure the identity.<\/p>\n<p><strong>Authorization Policy <\/strong>is another CRD that defines who should access the services.<\/p>\n<ul>\n<li>We can define Authentication rules to <strong>cluster scoped<\/strong> or <strong>namespace scoped <\/strong>and<\/li>\n<li>Allow or deny the authorization based on identity, source namespace, source IP, request method (GET, POST), headers,  and JWT.<\/li>\n<\/ul>\n<p>For <strong>authentication<\/strong>, Istio uses the following: <\/p>\n<ul>\n<li>Validate the JWT tokens on the Ingress gateway or the services themselves.<\/li>\n<li>Istio even works with the external <a href=\"https:\/\/devopscube.com\/github-actions-oidc-aws\/\" rel=\"noreferrer\">OIDC<\/a> providers like Keycloak, Auth0, etc.<\/li>\n<\/ul>\n<h3 id=\"3-observability\">3. Observability<\/h3>\n<p>Istio has built-in configurations to generate the telemetry of the traffic flow.<\/p>\n<p>Istio will generate the following: <\/p>\n<ol>\n<li>Metrics<\/li>\n<li>Traces <\/li>\n<li>Logs<\/li>\n<\/ol>\n<p>We can observe these using tools like Prometheus and Grafana.<\/p>\n<h2 id=\"istio-real-world-case-studies\">Istio Real World Case Studies<\/h2>\n<p>Istio or <a href=\"https:\/\/devopscube.com\/service-mesh-tools\/\" rel=\"noreferrer\">service mesh<\/a> is not new, a lot of organizations already use them. The following are some of the real case studies.<\/p>\n<ol>\n<li><a href=\"https:\/\/istio.io\/latest\/about\/case-studies\/rappi\/?ref=devopscube.com\" rel=\"noreferrer\">Rappi<\/a> initially built its own service mesh, though when the services increased to thousands of containers, it moved to Istio to manage it.<\/li>\n<li><a href=\"https:\/\/istio.io\/latest\/about\/case-studies\/atlassian\/?ref=devopscube.com\" rel=\"noreferrer\">Atlassian<\/a> used to use Envoy proxy for the communication, but for the benefits of Istio Daemon, they have moved to Istio.<\/li>\n<li><a href=\"https:\/\/istio.io\/latest\/about\/case-studies\/ebay\/?ref=devopscube.com\" rel=\"noreferrer\">eBay<\/a> has thousands of running containers. To ensure network communication and security during the scaling, they have started using Istio.<\/li>\n<\/ol>\n<p>There are more case studies available that you can refer to <a href=\"https:\/\/istio.io\/latest\/about\/case-studies\/?ref=devopscube.com\" rel=\"noreferrer\">here<\/a>.<\/p>\n<h2 id=\"how-to-get-started-with-istio\">How to get started with Istio<\/h2>\n<p>You can get started with Istio from here &#8211;&gt; <a href=\"https:\/\/devopscube.com\/istio-architecture\/\" rel=\"noreferrer\">Istio architecture<\/a><\/p>\n<p>Then move on to <a href=\"https:\/\/devopscube.com\/setup-istio-ambient-mode\/\" rel=\"noreferrer\">Istio Ambient Mode Setup<\/a> to gain hands on experience.<\/p>\n<p>Also, you can play around with a sample book info application <a href=\"https:\/\/istio.io\/docs\/samples\/bookinfo.html?ref=devopscube.com\" rel=\"noopener noreferrer\">from here<\/a><\/p>\n<p>If you are interested in Service mesh tools, look at the list of <a href=\"https:\/\/devopscube.com\/service-mesh-tools\/\" rel=\"noreferrer noopener\">best service mesh tools<\/a> for microservices.<\/p>\n<p>Also, you can look at <a href=\"https:\/\/linkerd.io\/?ref=devopscube.com\" rel=\"noopener noreferrer\">linkerd<\/a> a similar project by <a href=\"https:\/\/cncf.io\/?ref=devopscube.com\" rel=\"noopener noreferrer\">Cloud Native Computing Foundation<\/a> which offers support for mesosphere DCOS.<\/p>\n<hr>\n<p><strong>Ngu\u1ed3n:<\/strong> <a href=\"https:\/\/devopscube.com\/istio-opensource-platform-microservices-management\/\" target=\"_blank\" rel=\"noopener noreferrer\">What is Istio? What Does it Solve? \u2014 DevOpsCube<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Source: https:\/\/devopscube.com\/istio-opensource-platform-microservices-management\/<\/p>\n","protected":false},"author":1,"featured_media":276,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-275","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=275"}],"version-history":[{"count":0,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/media\/276"}],"wp:attachment":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}