<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vishal Vasnani on Medium]]></title>
        <description><![CDATA[Stories by Vishal Vasnani on Medium]]></description>
        <link>https://medium.com/@vishal9950?source=rss-460367ea697c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*16cq5yyVQcBJyHUmbjjNCg.jpeg</url>
            <title>Stories by Vishal Vasnani on Medium</title>
            <link>https://medium.com/@vishal9950?source=rss-460367ea697c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 20:43:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vishal9950/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building your very own Service Mesh]]></title>
            <link>https://faun.pub/building-your-very-own-service-mesh-4723895d061d?source=rss-460367ea697c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4723895d061d</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[istio]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[service-mesh]]></category>
            <dc:creator><![CDATA[Vishal Vasnani]]></dc:creator>
            <pubDate>Thu, 17 Jan 2019 09:54:33 GMT</pubDate>
            <atom:updated>2019-07-18T15:29:11.242Z</atom:updated>
            <content:encoded><![CDATA[<p>2018 — Microservices (MS) take the centre stage for backend architecture and API infrastructures.</p><p>2019 — Service mesh gives its additional benefits to MS making it powerful than ever.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q3nlU2Y6-MRxZz1l" /><figcaption>Photo by <a href="https://unsplash.com/@ripato?utm_source=medium&amp;utm_medium=referral">Ricardo Gomez Angel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What’s a Service Mesh?</h3><p>Service Mesh is a configurable infrastructure layer on top of your MS architecture that provides communication services to your microservices. The mesh provides load balancing, service discovery, canary deployments and much more without adding extra code in service level. To understand more about Service Mesh have a look at <a href="https://www.nginx.com/blog/what-is-a-service-mesh/">nginx.com</a>’s blog on Service Mesh that explains almost everything you need to know about it to get started.</p><h3>What would you need?</h3><ul><li><strong>NodeJS</strong> — To build a very basic MS application (you can use whatever language you favour as we’ll be containerizing it anyways 😎).</li><li><strong>docker</strong> — Docker to containerize microservices.</li><li><strong>kubectl</strong> — The command line interface for running Kubernetes commands.</li><li><strong>istioctl</strong> — We’ll be using something called <a href="https://istio.io/">Istio</a>. Istio is an open service mesh and to use it we’ll be needing istioctl, the command line interface for Istio.</li><li><strong>Google Cloud Platform(GCP) </strong>— The deployments are going to happen on GCP (or one can use any other platform or even do it locally!).</li></ul><h3>Let’s build!</h3><ul><li><strong>NodeJS MS</strong></li></ul><p>Build a simple ping-pong — healthCheck MS using whatever framework you like. This post is not focussed on the functionality of the MS and you can use whatever language you are comfortable with. For your convenience here is the sample I used for my purpose made using express in node.</p><p>Ping route!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ffb11f41b80df70d8ba68e86a6b694eb/href">https://medium.com/media/ffb11f41b80df70d8ba68e86a6b694eb/href</a></iframe><p>Health Check route!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ddf964645157f59aba4bbf8d43c277c0/href">https://medium.com/media/ddf964645157f59aba4bbf8d43c277c0/href</a></iframe><ul><li><strong>Docker</strong></li></ul><p>Before proceeding further, make sure you have Docker installed and running. Dockerize the MS by writing up a <em>Dockerfile</em>. For the above code you can use the following <em>Dockerfile. </em>Make sure you place the Dockerfile in the root folder of your MS.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/05003fd303cef98c68aef0a1e4d00144/href">https://medium.com/media/05003fd303cef98c68aef0a1e4d00144/href</a></iframe><p>Before building up the container you’ll be needing a GCP project. So head on to <a href="https://console.cloud.google.com/">GCP console</a> and create a new project.</p><p>After you have created a new project note the <em>projectID </em>or rather export it to the terminal constants by typing export PROJECT_ID=<em>&lt;your_project_id&gt;. </em>Fire up your terminal and type the following in the root directory of your MS.</p><pre>docker build -t gcr.io/${PROJECT_ID}/service-mesh:v1 .</pre><p>docker build is the command to build your container with specifications put in your Dockerfile. As we are using GCP, we will be using Google Container Registry (GCR) to store the image. There is a specific way to tag the images in order to save them in the GCR and they are private repositories associated with your project, that’s why the projectID in the name of the image. The part after projectID is the name you want to give to your image. v1 specifies the version of the current image. It will be required when you go for version upgrades or canary deployments (another amazing feature provided by service mesh). &quot;.&quot; specifies the path of your files, here, it being the root directory.</p><p>You’ll have an image created with the name and version tagged to it which you provided. You can verify that by typing docker images in your terminal. Now, verify that your docker build is working properly by running the container locally:</p><pre>docker run -p 8001:8001 gcr.io/${PROJECT_ID}/service-mesh:v1</pre><p>Hit <a href="http://localhost:8001/ping">http://localhost:8001/ping</a> or <a href="http://localhost:8001/healthChecka">http://localhost:8001/healthCheck</a> and check if the container is running as expected. If yes, you are ready to deploy!</p><p>To push your image to GCR, use the docker push command as:</p><pre>docker push gcr.io/${PROJECT_ID}/service-mesh:v1</pre><p>This will place your image in GCR and you can access it in your GCP project.</p><ul><li><strong>GCP</strong></li></ul><p>To start using GCP you have two options:</p><ol><li>Setup gcloud on your local computer using this guide.</li><li>Use GCP’s shell in the GCP console itself.</li></ol><p>We’ll go with the second option as you don’t have to worry about installing kubectl (CLI for kubernetes) and the access to the cluster (which we’ll be creating in a while) becomes easy. Nevertheless if you wish to build the service mesh locally or on some other platform you can use the following guides:</p><p>&gt; <a href="https://cloud.google.com/sdk/install">gcloud</a> — Google Cloud SDK for accessing projects on your system.</p><p>&gt; <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/#download-as-part-of-the-google-cloud-sdk">kubectl</a> — CLI for kubernetes.</p><p>Once you have these, next steps will be similar. The only difference would be they’ll be running in the cloud shell.</p><p>Now that you have all the components installed follow the below instructions:</p><p>In order to create clusters you need to enable the Kubernetes Engine API in the console. To do that open the <strong>API &amp; Services </strong>section in the console and enable <strong>Kubernetes Engine API</strong>. You will also have to enable <strong>Billing </strong>from the menu as the clusters will have a cost. If you are a new user then you’ll get $300 worth GCP credits which should be enough for this but just make sure to disable billing as soon as you’ll not be needing the clusters and re-enable them once needed.</p><p>Now, set your project and compute/zone in gcloud config.</p><pre>gcloud config set project [PROJECT_ID]<br>gcloud config set compute/zone us-central1-b</pre><p>Create clusters on GCP by running the command:</p><pre>gcloud container clusters create service-mesh --num-nodes=3</pre><p>The above command creates a cluster on GCP with the name “service-mesh” having three nodes. The process will take around 5–10 minutes. So if you want to grab a cup of coffee, now is the time :)</p><p>After the process is up you can head on to your GCP console to verify if your clusters are up. You can check it in <strong><em>Kubernetes &gt; Clusters</em></strong> or in your terminal run this command gcloud compute instances list to see your running clusters.</p><p>Now that you have your clusters running, you need to install Istio.</p><p>Istio is an open source tool to create service mesh. Istio makes it easy to create network of deployed services with load balancing, service-to-service authentication, monitoring, and more, without any changes in service code. Istio deploys a special sidecar proxy, an extended version of <a href="https://www.envoyproxy.io/">Envoy</a> proxy — a sidecar proxy for services that is used by a lot of tech giants — into each of your pods that intercepts all network communication between MSs. To install istioctl (Istio CLI), in your system with cluster access, run the command</p><pre>curl -L <a href="https://git.io/getLatestIstio">https://git.io/getLatestIstio</a> | sh -</pre><p>You’ll have an istio-1.0.x folder created in the same location. Navigate to the folder with extracted files, make sure you are able to access your kubernetes cluster and install istio-system with</p><pre>kubectl apply -f install/kubernetes/istio-demo.yaml</pre><p>The istio components will be installed in their own namespace, i.e., istio-system, and these services can access your MSs in other namespace. Also make sure you export the istioctl command whilst in the root directory of istio installation by running export PATH=$PWD/bin:$PATH to be able to access <strong>istioctl</strong> command.</p><p>To verify your istio installation run the command:</p><pre>kubectl get service -n istio-system</pre><p>You’ll get an output similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eiQ74MK-jyakfxxhULuFGA.png" /></figure><p>To see the pods booting up, run the command</p><pre>kubectl get pods -n istio-system</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m-diq5Jpy4Q4kgji4Su-WQ.png" /></figure><p>Now that your istio-system is ready, let’s deploy the actual services.</p><p>For deploying, istio needs a config file in .yaml format. The config file decides what and how your deployment is gonna look. There are two files mainly that you require — deployment config and routing config.</p><ul><li><strong>Deployment Config:</strong> Decides how your deployment looks. It specifies the name of the deployment, it’s replicas, what image(docker) to choose, labels for features like canary deployments, name of the service, port to expose and much more. There is not a lot of material on the internet on writing these config files. Even I got it right after a series of hit and trials, so no worries 🙂. Do let me know by commenting if there is any good documentation for writing these. For our example the Deployment-Service config will look like below. Name this file my-website.yaml.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/44273d11b0afae97c3e2789f6a52ec4c/href">https://medium.com/media/44273d11b0afae97c3e2789f6a52ec4c/href</a></iframe><p>A lot of specifications above are self-explanatory but the fashion they are written is a bit hard to catch. There is one <strong>Deployment</strong> named web-v1 with other attributes and one <strong>Service</strong> that selects the deployment using the selector on the basis of the tag app. It will be a bit difficult when you go for a much more complex service but as I mentioned earlier, there is no good documentation for it. So we’ll prefer good ol’ Hit and Trial ✌🏻unless you’ve found some docs and would love to mention in the response section for other people and also me to know.</p><ul><li><strong>Routing Config:</strong> The routing config decides how your traffic is going to be routed amongst your services. Let’s say you want 10% traffic on v2 of your service and rest on v1, you can set it in this config. Although I haven’t got any luck in implementing this feature yet but I am constantly trying and I will write a separate blog on “Canary Deployments” as soon as I am successful. A basic routing config will include a <strong>Gateway</strong> specification which specifies the gateway to select, i.e., the istio’s ingressgateway so as to pass traffic through istio and a <strong>VirtualService</strong> specification which specifies the gateway to choose, uri’s to match and destination host and port. The config file will be called website-routing.yaml and it will contain the following content:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4781174c5ac608d5cc9bd35413594288/href">https://medium.com/media/4781174c5ac608d5cc9bd35413594288/href</a></iframe><p>Now that you have these manifests to setup your istio service-mesh run these commands in order to let your istio-system know your required configuration.</p><pre>kubectl apply -f &lt;(istioctl kube-inject -f my-website.yaml) </pre><p>Confirm that the application has been deployed correctly by running:</p><pre>kubectl get services </pre><p>You’ll get the services as defined in your my-website.yaml file.</p><p>Also check your pods running as soon as your services are up by running:</p><p>kubectl get pods or watch kubectl get pods as this may take some time.</p><p>Finally define your ingress gateway routing for your application as defined in the website-routing.yaml file.</p><pre>kubectl apply -f website-routing.yaml </pre><p>Your application will be deployed!</p><p>To use your application, find the port and ingress IP as follows:</p><pre>kubectl get svc istio-ingressgateway -n istio-system </pre><p>The output will have the External IP of the ingress-gateway which you can use to contact your application. Just curl the address and port with the specified route (in this case /ping):</p><pre>curl http://${EXTERNAL_IP}:${PORT}/ping </pre><p>and voila, you’ll get your output (in this case “Pong!”).</p><p>Congratulations 🎉! You have your service-mesh implemented and running. Do explore more about <strong><em>Service Mesh</em></strong> on the reference links mentioned below and on the internet and create better architecture in your projects.</p><h3>References</h3><ul><li><a href="https://www.nginx.com/blog/what-is-a-service-mesh/">https://www.nginx.com/blog/what-is-a-service-mesh/</a></li><li><a href="https://kublr.com/blog/implementing-a-service-mesh-with-istio-to-simplify-microservices-communication/">https://kublr.com/blog/implementing-a-service-mesh-with-istio-to-simplify-microservices-communication/</a></li><li><a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/installing-istio">https://cloud.google.com/kubernetes-engine/docs/tutorials/installing-istio</a></li><li><a href="https://istio.io/docs/concepts/what-is-istio/">https://istio.io/docs/concepts/what-is-istio/</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Join our community Slack and read our weekly Faun topics ⬇</strong></p><figure><a href="https://www.faun.dev/join/?utm_source=medium.com%2Ffaun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oSdFkACJxs5iy1oR" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4723895d061d" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/building-your-very-own-service-mesh-4723895d061d">Building your very own Service Mesh</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s success without failure?]]></title>
            <link>https://medium.com/@vishal9950/whats-success-without-failure-3c0e56b3f767?source=rss-460367ea697c------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c0e56b3f767</guid>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[success]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[life-lessons]]></category>
            <dc:creator><![CDATA[Vishal Vasnani]]></dc:creator>
            <pubDate>Tue, 29 May 2018 05:20:55 GMT</pubDate>
            <atom:updated>2018-05-31T12:31:56.954Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zti-S17OAsFe4kqsovOY8w.jpeg" /><figcaption>Image by <a href="https://quotefancy.com/quote/841404/John-C-Maxwell-There-is-no-success-without-failure-and-losses">quotefancy.com</a></figcaption></figure><p>Success is not something that comes for granted or is inherited from someone. It is not something that comes with instructions which one can follow to become successful in life and it is definitely not something that can be calculated or predicted for anyone. Then what is it really:</p><blockquote>I believe success is something that is measured by one’s failures in life and his/her comebacks after those. Comebacks are important. Failures will remain failures if not worked upon. The repetitive effort, the constant determination and most importantly the desire of not quitting is what turns failure into success.</blockquote><p>To prove my point, think of any person who you believe is successful. Now take a look at his journey through life. How did he become the person he is today? You have the answer that proves my point.</p><h3>How do you overcome failures?</h3><p>Failures are an important part of the lifecycle and, trust me upon this, there is no harm in accepting them. The problem lies when one does not act to overcome them. It gets even worse when you take a hit from them and are scared to even think about continuing further. Someone has said it so accurately:</p><blockquote><a href="https://www.catherineplano.com.au/comeback-always-stronger/">The comeback is always stronger than the setback.</a></blockquote><p>Now sometimes these failures can become frustrating and daunting. You might think of just leaving the work and get on something new. But… before you ever think of quitting something, do recall why you started it. This way you will have a reason to not quit or if there is no other way but to quit, you will learn a lesson, a lesson that will help you make better decisions in future endeavours.</p><blockquote>Sometimes when you innovate, you make mistakes. It is best to admit them quickly, and get on with improving your other innovations — Steve Jobs</blockquote><h3>The journey isn’t going to be easy…</h3><p>A lot of people do not realise the number of sacrifices and the amount of hardships a person has to face in order to reach the top.</p><p>When you are on your way to the top, believe me, you will face a lot of hate, a lot of jealousy and there will always be people who will try their best to bring you down but, this is what these people know. They don’t know how to succeed and have always made their way in this manner. You are different… you are not among them. You have fought for where you are now, you have worked your ass off. You cannot be an easy one. You have to be strong throughout the journey and still respect these people by taking these instances as a challenge. There will definitely be times when you will feel low and you will be frustrated with what you are doing. You have to overcome those feelings and be strong. You need to surround yourself with people who are positive towards the common goal. People who motivate you to do better, who challenge you to be better… <strong><em>Heidi</em></strong> <strong><em>Klum</em></strong> says:</p><blockquote>I think it’s important to get your surroundings as well as yourself into a positive state — meaning surround yourself with positive people, not the kind who are negative and jealous of everything you do — <a href="https://www.brainyquote.com/quotes/heidi_klum_449843?src=t_surround_yourself">Heidi Klum</a></blockquote><p>You will also have to do countless sacrifices which no one else realises. Sometimes you will have to leave behind things you love a lot, could be family, friends or anything else. It will be hard and painful, but the fruit that you will get after you achieve the goal will be the sweetest one you ever had.</p><h3>What’s success without failure?</h3><p>Failures are the stepping stones one faces on their way. Success and failure go together in harmony. They are like the hurdles all horses have to jump over to finish the race but only the strong one’s are able to. The real joy of success only comes when you have fought very hard for that. There is no fun in getting something for granted…</p><p>Trust yourself, trust in whatever you are doing and take lessons from life everyday as it has a lot to offer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZyS-RFj8DKEiEpHJCB97XA.jpeg" /><figcaption>Image by <a href="https://www.instagram.com/millionaire_mentor/">Millionaire Mentor</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c0e56b3f767" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>