DevOps Interview Questions: How will you scale your current CI-CD pipeline.

This is a very important question and can be asked in different ways. In a good interview, you can expect questions related to the technologies that you have worked on. You have to take the interviewer an in-depth tour of your systems. This is where this question can come. Now if you have a very good understanding of your systems, you will be aware of the suspected points of a bottleneck. In this article, we will define a very basic pipeline and then try to answer this question based on that. Please note this answer will depend on different use cases but from here you can get the points

Let’s look at this pipeline.

You have GitLab as your code repository then comes Jenkins to test and build the code and then push the artifact to artifactory. Then a Jenkins deploys that artifact to a cluster.

Now let try and identify a few of the bottlenecks in the above pipeline.

So the first thing that I can think of on a huge scale is your artifactory which serves the artifacts should scale. Now, this can be an issue. It will be tough if you have to serve 10000 artifacts per minute.

Now you can fix this in a very simple manner. Since you know these are huge read calls and the artifact with a specific version will never change. You can put a cache in front of the main artifact and make all the requests go to cache servers. If the artifact is present on cache they will serve else they will read the artifact save in cache and then serve. This will very easily reduce the number of calls on artifactory. And you will also be scale these caches horizontally.

Now if you have a huge number of builds coming per min. Your Jenkins should also be able to scale. This is very simple in Jenkins and you can scale it horizontally to tackle this problem.

Now, let’s take the case where you are using Ansible to install packages on machines. This can again be a bottleneck. Since Ansible uses ssh to install on machines this will cause problems at scale. So you again have to think of a way to divide the servers into a different set of ansible boxes and run in parallel. Or you can opt for solutions like chef which are more scalable.

These are a few points, you can always find out more. These are mostly open-ended questions so you can answer as per your knowledge. There is no exact correct answer. In these questions, the interviewer will try to understand your approach. Always think in the direction of how you can implement horizontal scaling. Also, you can try to do tasks asynchronously if they are synchronous jobs.

If you like the article please share and subscribe.

Follow the below tag for more interview questions

Gaurav Yadav

Gaurav is cloud infrastructure engineer and a full stack web developer and blogger. Sportsperson by heart and loves football. Scale is something he loves to work for and always keen to learn new tech. Experienced with CI/CD, distributed cloud infrastructure, build systems and lot of SRE Stuff.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.