Site Reliability Engineer
50+ Site Reliability Engineer Interview Questions and Answers
Q1. Write a program to find a missing number in Arrays?
Program to find a missing number in Arrays
Sort the array and iterate to find the missing number
Use XOR operation to find the missing number
Calculate the sum of all numbers and subtract from the sum of expected numbers to find the missing number
Q2. write script to display logs of GET response and response time and code from a log file?
Script to display logs of GET response and response time and code from a log file
Use grep command to filter GET requests from the log file
Use awk command to extract response time and response code from the filtered logs
Format the output using printf command
Example: grep 'GET' logfile | awk '{print $4, $9, $NF}' | printf '%-20s %-10s %-10s '
Site Reliability Engineer Interview Questions and Answers for Freshers
Q3. What is the Collection Framework?
The Collection Framework is a unified architecture for representing and manipulating collections in Java.
It provides interfaces like List, Set, Queue, etc. for storing and manipulating collections of objects.
It also provides concrete classes like ArrayList, HashSet, PriorityQueue, etc. that implement these interfaces.
It supports algorithms like sorting, searching, and shuffling on collections.
It is a part of the Java Collections Framework.
Example: List
names = new ArrayList<>...read more
Q4. What are the linux commands do you know ?
I know various Linux commands for file management, process management, networking, and system administration.
File management: ls, cd, cp, mv, rm, mkdir, touch
Process management: ps, top, kill, nice, renice
Networking: ping, traceroute, netstat, ifconfig, ssh
System administration: sudo, apt-get, systemctl, journalctl, crontab
Q5. What happens when two docker containers exposes on the same port .
It creates a conflict and the container that started last will take over the port.
The container that started last will take over the port.
The first container will be inaccessible on that port.
The conflict can be resolved by mapping different host ports to the container ports.
Q6. What is SLI and SLO ? Tell us how did you set up or used SLI SLO in your day to day task ?
SLI stands for Service Level Indicator and SLO stands for Service Level Objective. They are used to measure and define the reliability of a service.
SLI is a metric that measures the performance of a service, such as latency or availability.
SLO is a target value or range for a specific SLI that defines the acceptable level of reliability for a service.
Setting up SLI involves defining the metrics to be measured and collecting data to calculate them.
Using SLO involves setting sp...read more
Share interview questions and help millions of jobseekers 🌟
Q7. How to see the cpu info on linux?
To see CPU info on Linux, use the 'lscpu' command.
Open the terminal and type 'lscpu' command
This will display detailed information about the CPU architecture, vendor, model name, speed, cache size, and more.
Other commands like 'cat /proc/cpuinfo' and 'top' can also be used to view CPU information.
Q8. What is Jenkins, Shell scripting, Cron job, system files
Jenkins is a CI/CD tool, Shell scripting automates tasks, Cron job schedules tasks, System files store configuration data.
Jenkins is a popular CI/CD tool used for continuous integration and deployment
Shell scripting is a way to automate tasks on a Unix/Linux system using command line interface
Cron job is a scheduling utility in Unix/Linux systems used to schedule tasks at specific times
System files are configuration files that store system-wide settings and preferences
Site Reliability Engineer Jobs
Q9. how will you monitor intermittent high response and how to troubleshoot
To monitor intermittent high response, use monitoring tools like Prometheus or Datadog. Troubleshoot by analyzing logs, identifying bottlenecks, and optimizing code.
Set up monitoring tools like Prometheus or Datadog to track response times
Analyze logs to identify patterns of high response times
Use profiling tools to pinpoint bottlenecks in the code
Optimize code to improve response times
Q10. what is VPC ?, NAT, Subnet networking protocols
VPC is a virtual private cloud that allows users to create a private network within the public cloud.
VPC provides a secure and isolated environment for resources in the cloud
NAT (Network Address Translation) allows instances in a private subnet to access the internet
Subnets are subdivisions of a VPC that allow users to segment their resources and apply different security policies
Q11. swap memory in linux, projects worked on , explain CI/CD , docker, kubernetes
Questions on swap memory, projects, CI/CD, Docker, and Kubernetes for Site Reliability Engineer role.
Swap memory is a space on the hard disk used as virtual memory when RAM is full.
Projects worked on may include automation, monitoring, and scaling.
CI/CD is a software development practice that involves continuous integration, testing, and deployment.
Docker is a containerization platform that allows for easy deployment and management of applications.
Kubernetes is an open-source...read more
Q12. How to integrate application to observability tools like Grafana ?
Integrating applications to observability tools like Grafana involves setting up data sources and creating dashboards.
Configure data sources in Grafana to connect to the application's metrics
Create custom dashboards in Grafana to visualize the application's performance
Use Grafana plugins or APIs to enhance monitoring capabilities
Q13. How can you improve/automate your solution further?
By implementing continuous integration and deployment, using configuration management tools, and leveraging monitoring and alerting systems.
Implement continuous integration and deployment to automate the process of building, testing, and deploying software changes.
Use configuration management tools like Ansible or Puppet to automate the provisioning and configuration of infrastructure.
Leverage monitoring and alerting systems like Prometheus or Nagios to automatically detect a...read more
Q14. What is abstract class in Java?
An abstract class is a class that cannot be instantiated and is used as a base class for other classes.
An abstract class can have abstract and non-abstract methods.
Abstract methods have no implementation and must be implemented by the subclass.
A class can only extend one abstract class but can implement multiple interfaces.
Abstract classes are used to provide a common interface for a group of related classes.
Example: abstract class Animal { abstract void makeSound(); }
Q15. What would you recommend for a junior engineer between kubernetes and Lambda
It depends on the specific use case and requirements of the project.
Consider the complexity and scale of the project - Kubernetes is better suited for large, complex applications with multiple services, while Lambda is more suitable for smaller, event-driven applications.
Evaluate the cost implications - Lambda can be more cost-effective for low-traffic applications due to its pay-per-use pricing model, while Kubernetes may be more cost-effective for high-traffic applications ...read more
Q16. what is git and few commands related to it
Git is a version control system used for tracking changes in code. It allows collaboration and easy management of codebase.
git init - initializes a new git repository
git add - adds changes to the staging area
git commit - commits changes to the repository
git push - pushes changes to a remote repository
git pull - pulls changes from a remote repository
git branch - lists all branches in the repository
git merge - merges changes from one branch to another
Q17. Write a terraform template to create ec2 instance in AWS
Terraform template to create EC2 instance in AWS
Define provider and region
Create security group and define ingress/egress rules
Define instance type, AMI, key pair, and user data
Create instance resource and associate with security group
Q18. Constructor is declared static or not?
Constructor can be declared static or non-static depending on the use case.
If a constructor is declared static, it means it can be called without creating an instance of the class.
Static constructors are used to initialize static fields of the class.
Non-static constructors are used to initialize instance fields of the class.
If a class has both static and non-static constructors, the non-static constructor is called when an instance of the class is created.
Q19. Design a CI/CD pipeline for an application Deployed on EC2 in production. Make sure to make application scalable, reliable and the pipeline go through automated testing.
Design a CI/CD pipeline for an application on EC2 in production ensuring scalability, reliability, and automated testing.
Use a version control system like Git for managing code changes.
Set up a CI/CD tool like Jenkins to automate the build, test, and deployment process.
Implement automated testing at different stages of the pipeline (unit tests, integration tests, etc.).
Utilize infrastructure as code tools like Terraform to provision and manage EC2 instances.
Include monitoring...read more
Q20. How to copy contents of a file to another file?
To copy contents of a file to another file, you can use file handling methods in programming languages.
Open the source file in read mode and the destination file in write mode
Read the contents of the source file and write them to the destination file
Close both files after the copying process is complete
Q21. What are locators present in Selenium?
Locators are used to identify web elements in Selenium.
Locators are used to find and interact with web elements on a web page.
There are several types of locators in Selenium, including ID, name, class name, tag name, link text, and partial link text.
For example, to find an element with the ID 'username', you would use the ID locator: driver.findElement(By.id('username'));
Q22. Type the code for fibonacci series in your preferred language
Code for Fibonacci series in Python
Define a function that takes an integer as input
Initialize two variables with 0 and 1 respectively
Use a for loop to iterate through the range of the input integer
Add the two variables and assign the result to a third variable
Print the third variable and update the first two variables
Q23. python program to remove whitespace from string, strings are anagram, reverse a string
Python program to remove whitespace, check if strings are anagram, and reverse a string.
Use the replace() function to remove whitespace from a string.
Use sorted() function to check if two strings are anagrams.
Use string slicing to reverse a string.
Q24. How to handle deployment tasks like rollback?
Rollback in deployment tasks is handled by following a structured process to revert to a previous stable version.
Maintain version control for all deployments
Automate rollback process to minimize downtime
Perform thorough testing before deploying to production
Monitor system health during deployment to detect issues
Have a rollback plan in place with clear steps and communication channels
Document and learn from rollback incidents to improve future deployments
Q25. Write a program to Reverse a String?
Program to reverse a string
Use a loop to iterate through the string and append each character to a new string in reverse order
Alternatively, use built-in string reversal functions in some programming languages
Q26. what is dictionary in python ?
A dictionary is a collection of key-value pairs in Python.
Keys must be unique and immutable.
Values can be of any data type.
Dictionaries are mutable and can be modified.
Access values using keys.
Use the 'in' keyword to check if a key exists in the dictionary.
Q27. To find a one element Xpath in Amazon.com
To find a one element Xpath in Amazon.com
Inspect the element in the browser
Right-click on the element and select 'Copy XPath'
Use the copied XPath in your code
Q28. What is explicit Constructor?
An explicit constructor is a constructor that is defined with the 'explicit' keyword.
It is used to prevent implicit conversions from the constructor's parameter type to the class type.
It requires the constructor to be called explicitly with the class name and constructor arguments.
It is commonly used to avoid unexpected type conversions and improve code clarity.
Q29. How to merge perticular commits to branch ?
To merge particular commits to a branch, use git cherry-pick command.
Identify the commit hash of the specific commit you want to merge
Switch to the branch where you want to merge the commit
Use 'git cherry-pick
' to apply the changes of that commit to the current branch
Q30. Linux command to fetch larger files in specific directory
Use 'find' command to fetch larger files in specific directory
Use 'find' command with '-size' option to specify file size
Example: find /path/to/directory -type f -size +100M
Q31. What is interface in Java?
An interface in Java is a collection of abstract methods and constants that can be implemented by a class.
An interface is declared using the interface keyword.
It can be implemented by any class using the implements keyword.
All methods in an interface are implicitly public and abstract.
Interfaces can also contain constants, which are implicitly public, static, and final.
Interfaces are used to achieve abstraction and provide a way for unrelated classes to communicate with each ...read more
Q32. Write a Ansible playbook for any requirement
Ansible playbook to install and configure Apache web server
Install Apache package using apt or yum module
Copy configuration files using copy module
Start and enable Apache service using service module
Q33. Describe how you troubleshoot a unknown error
I systematically gather information, analyze logs, consult documentation, and test hypotheses to identify and resolve the error.
Gather information about the error: check logs, error messages, and user reports.
Consult documentation and resources related to the technology or system in question.
Isolate the issue by testing different components or configurations.
Formulate hypotheses based on gathered information and test them to identify the root cause.
Collaborate with team membe...read more
Q34. What is reletive Xpath?
Relative XPath is a way to locate elements in XML or HTML documents based on their position relative to other elements.
Relative XPath uses the relationships between elements to navigate the document structure.
It is more flexible than absolute XPath as it adapts to changes in the document's structure.
Relative XPath expressions start with a reference to an element and then use various axes and predicates to locate the desired element.
Example: //div[@class='container']/a[2] sele...read more
Q35. Chrome capabilities of selenium automation
Selenium automation can control Chrome browser capabilities such as handling pop-ups, cookies, and browser settings.
Selenium can handle pop-ups and alerts using the switchTo() method
Cookies can be managed using the addCookie() and deleteCookie() methods
Browser settings can be modified using the ChromeOptions class
Examples: disabling images, setting the browser window size, and using headless mode
Q36. What is HPA is kubernetes ??
HPA stands for Horizontal Pod Autoscaler in Kubernetes.
HPA automatically scales the number of pods in a deployment based on CPU utilization or other custom metrics.
It ensures that the application is always available and can handle increased traffic.
HPA can be configured using YAML files or through the Kubernetes API.
Example: kubectl autoscale deployment my-deployment --cpu-percent=50 --min=1 --max=10
HPA can also be used with custom metrics provided by Prometheus or other moni...read more
Q37. Tell the syntax of self join
Self join is a SQL query that joins a table with itself.
Use the table name twice in the query, with different aliases
Specify the columns to be selected from each table
Specify the join condition using the aliases
Example: SELECT a.column1, b.column2 FROM table a JOIN table b ON a.column3 = b.column4
Q38. security patch in production with minimal downtime
Implement rolling updates and blue-green deployments to apply security patches with minimal downtime.
Utilize rolling updates to gradually apply security patches to different instances without taking the entire system offline.
Implement blue-green deployments to switch traffic from the old version (blue) to the new version (green) seamlessly.
Use automation tools like Ansible, Puppet, or Chef to streamline the patching process and reduce human error.
Perform thorough testing in a...read more
Q39. Linux Command to List CPU's in the system
Command to list CPUs in Linux system
Use the 'lscpu' command to list detailed information about CPUs
Use the 'nproc' command to display the number of processing units available
Use the 'cat /proc/cpuinfo' command to view information about each CPU core
Q40. Design TCP Server with TCP sockets and sys calls
Designing a TCP server using TCP sockets and sys calls
Create a socket using socket() system call
Bind the socket to an address and port using bind() system call
Listen for incoming connections using listen() system call
Accept incoming connections using accept() system call
Communicate with clients using read() and write() system calls
Q41. Tell me 25 linux commands
List of 25 commonly used Linux commands
ls - list directory contents
cd - change directory
pwd - print working directory
mkdir - make directory
rm - remove files or directories
cp - copy files or directories
mv - move or rename files or directories
cat - concatenate and display files
grep - search for a pattern in a file
find - search for files in a directory hierarchy
chmod - change file mode bits
chown - change file owner and group
ps - report a snapshot of the current processes
kill - s...read more
Q42. How we handle the infrastructure?
We handle the infrastructure by using automation, monitoring, and scalability.
Utilize automation tools like Terraform or Ansible to provision and manage infrastructure.
Implement monitoring solutions like Prometheus or Grafana to track system performance and health.
Design infrastructure to be scalable and resilient to handle varying workloads.
Regularly review and update infrastructure to ensure security and efficiency.
Collaborate with cross-functional teams to align infrastruc...read more
Q43. Design Cloud Architecture for a 3tier application
Design a cloud architecture for a 3-tier application
Use load balancers to distribute traffic across multiple instances
Deploy application servers in multiple availability zones for high availability
Use a managed database service for the database tier
Implement auto-scaling to handle varying traffic loads
Use a content delivery network (CDN) for static assets
Implement monitoring and alerting to detect and respond to issues
Ensure security by using encryption, firewalls, and access...read more
Q44. What is cloud watch, jeera
CloudWatch is a monitoring service for AWS resources. Jira is a project management tool.
CloudWatch is used to collect and track metrics, collect and monitor log files, and set alarms.
Jira is used for issue tracking, bug tracking, and project management.
CloudWatch can be used to monitor EC2 instances, RDS DB instances, and Elastic Load Balancers.
Jira can be used to manage software development projects, track bugs and issues, and collaborate with team members.
Q45. What is Liveness probe in K8s?
Liveness probe in K8s is used to determine if a container is running properly by checking if it is responsive.
Liveness probes are configured in Kubernetes to periodically check the health of a container.
If the liveness probe fails, Kubernetes will restart the container.
Common liveness probe types include HTTP, TCP, and Exec probes.
Example: A HTTP liveness probe can check if a web server within a container is responding with a 200 status code.
Q46. Command to check free disk space
Command to check free disk space
Use the 'df' command to check free disk space
The '-h' option displays the output in human-readable format
The '-T' option shows the filesystem type
The '-x' option excludes specific filesystem types
The '-t' option filters the output based on filesystem type
Q47. Command to check free memory space
Command to check free memory space
Use the 'free' command to check free memory space
The 'free' command displays the total, used, and free memory space in the system
It also shows the amount of memory used for buffers and cache
The 'free' command can be used with options like '-h' for human-readable output
Q48. difference between NoSQL and SQL
NoSQL is a non-relational database that provides flexible schema and horizontal scalability, while SQL is a relational database with structured schema and vertical scalability.
NoSQL databases are schema-less and can handle unstructured data.
SQL databases use structured query language and have predefined schemas.
NoSQL databases are horizontally scalable, allowing for easy distribution of data across multiple servers.
SQL databases are vertically scalable, meaning they can handl...read more
Q49. Difference between Apache & Nagios
Apache is a web server while Nagios is a monitoring tool.
Apache is used to serve web pages and applications.
Nagios is used to monitor the health and performance of servers, applications, and services.
Apache can be used with Nagios to monitor web servers and applications.
Apache is open source and widely used, while Nagios is also open source but less popular.
Q50. Copy files to a remote machine
To copy files to a remote machine, use a file transfer protocol like SCP or SFTP.
Use SCP (Secure Copy) command to copy files between local and remote machines
Example: scp /path/to/local/file username@remote:/path/to/destination
Use SFTP (Secure File Transfer Protocol) for interactive file transfers
Example: sftp username@remote, then use put command to upload files
Interview Questions of Similar Designations
Top Interview Questions for Site Reliability Engineer Related Skills
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month