Open In App

Site Reliability Engineering(SRE) Interview Questions and Answers

SRE, or Site Reliability Engineering, is a rapidly growing field that is essential for ensuring the smooth operation of large-scale systems. SREs are responsible for designing, building, and maintaining the infrastructure that keeps these systems up and running 24/7. As a result, there is a high demand for qualified SREs, and the competition for SRE jobs is fierce.



If you are considering a career in SRE, you must be prepared to answer some tough technical interview questions. These questions will cover a wide range of topics, from systems engineering to software development to operations. In this article, we will provide you with some of the most common SRE technical interview questions, to help you prepare for your next interview

 



Theory Based Questions 

Q1. Difference between SNAT and DNAT

SNAT

DNAT 

It is generally used to change a private address or port into a public address or port for packets leaving the network. It is generally used to redirect incoming packets with a destination of a public address or port to a private IP address or port inside the network.
It translates the source IP address within a connection to the BIG-IP system IP address that one defines. It translates IP addresses of internal servers that are protected by the device to public IP addresses. 
It is used to change the source address of the packet.   It is used to change the destination address of the packet.  
It also changes the source port in TCP/UDP headers.   It also changes the destination port in TCP/UDP headers.  
It generally allows multiple hosts on the inside to get any host on the outside.  It generally allows multiple hosts on the outside to get a single host on the inside.  

Q2. What is Transmission Control Protocol (TCP)?

TCP (Transmission Control Protocol) is one of the main protocols of the Internet protocol suite. It lies between the Application and Network Layers which are used in providing reliable delivery services. It is a connection-oriented protocol for communications that helps in the exchange of messages between different devices over a network. The Internet Protocol (IP), which establishes the technique for sending data packets between computers, works with TCP.

TCP

Q3. Differences between TCP and UDP

Basis

Transmission Control Protocol (TCP)

User Datagram Protocol (UDP)

Type of Service

TCP is a connection-oriented protocol. Connection 

orientation means that the communicating devices should establish a connection before transmitting data and should close the connection after transmitting the data.

UDP is the Datagram-oriented protocol. This is because 

there is no overhead for opening a connection, maintaining a connection, or terminating a connection. UDP is efficient for broadcast and multicast types of network transmission.

Reliability TCP is reliable as it guarantees the delivery of data to the destination router. The delivery of data to the destination cannot be guaranteed in UDP.
Error checking mechanism                                 

TCP provides extensive error-checking mechanisms. 

It is because it provides flow control and acknowledgment of data.

UDP has only the basic error-checking mechanism using checksums.
Acknowledgment An acknowledgment segment is present. No acknowledgment segment.

Q4. Difference between Hard link and Soft link

Comparison Parameters

Hard link

Soft link

Inode number* Files that are hard linked
take the same inode number.
Files that are soft linked
take a different inode number.
Directories Hard links are not
allowed for directories.
(Only a superuser* can do it)
Soft links can be used for
linking directories.
File system It cannot be used
across file systems.
It can be used
across file systems.
Data Data present in the original
file will still be available
in the hard links.
Soft links only point to the
file name, it does not retain
data of the file.
Original file’s deletion If the original file is removed, the link
will still work as it accesses the data the
original was having access to.
If the original file is removed, the link
will not work as it doesn’t access the
original file’s data.
Speed Hard links are comparatively faster. Soft links are comparatively slower.

Q5. What are the fundamental stages of DevOps, and what tools do you use for each of these? 
DevOps Lifecycle is the set of phases that includes DevOps for taking part in Development and Operation group duties for quicker software program delivery. DevOps follows positive techniques that consist of code, building, testing, releasing, deploying, operating, displaying, and planning. DevOps lifecycle follows a range of phases such as non-stop development, non-stop integration, non-stop testing, non-stop monitoring, and non-stop feedback.

7 Cs of DevOps 

  1. Continuous Development
  2. Continuous Integration
  3. Continuous Testing
  4. Continuous Deployment/Continuous Delivery
  5. Continuous Monitoring
  6. Continuous Feedback
  7. Continuous Operations

Q6.Difference between fork() and exec()

fork()

exec()

It is a system call in the C programming language It is a system call of operating system
It is used to create a new process exec() runs an executable file
Its return value is an integer type It does not creates new process
It does not takes any parameters. Here the Process identifier does not changes
It can return three types of integer values In exec() the machine code, data, heap, and stack of the process are replaced by the new program.

Q7. What is swap memory? 
A computer has a sufficient amount of physical memory but most of the time we need more so we swap some memory on disk. Swap space is a space on a hard disk that is a substitute for physical memory. It is used as virtual memory which contains process memory image

Q8. What is Shell in Linux? 
A shell is a special user program that provides an interface for the user to use operating system services. Shell accepts human-readable commands from users and converts them into something which the kernel can understand. It is a command language interpreter that executes commands read from input devices such as keyboards or from files. The shell gets started when the user logs in or starts the terminal.

Shell is broadly classified into two categories :

Q9. What is virtual memory? 
Virtual Memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of the main memory. The addresses a program may use to reference memory are distinguished from the addresses the memory system uses to identify physical storage sites and program-generated addresses are translated automatically to the corresponding machine addresses.

Q10. What is the difference between a process and a thread? 

Process

Thread

Process means any program is in execution. Thread means a segment of a process.
The process takes more time to terminate. The thread takes less time to terminate.
It takes more time to creation. It takes less time for creation.
It also takes more time for context switching. It takes less time for context switching.
The process is less efficient in terms of communication. Thread is more efficient in terms of communication.

Q11. What is Sharding in DBMS?  
Sharding is a very important concept that helps the system to keep data in different resources according to the sharding process. The word “Shard” means “a small part of a whole“. Hence Sharding means dividing a larger part into smaller parts. In DBMS, Sharding is a type of database partitioning in which a large database is divided or partitioned into smaller data and different nodes. These shards are not only smaller, but also faster and hence easily manageable.

Q12.Why do we use the concept of Private IPs and Public IPs?

The Private IP Address of a system is the IP address that is used to communicate within the same network. Using private IP data or information can be sent or received within the same network. The router basically assigns these types of addresses to the device. Unique private IP Addresses are provided to each and every device that is present on the network. These things make Private IP Addresses more secure than Public IP Addresses.

The Public IP Address of a system is the IP address that is used to communicate outside the network. A public IP address is basically assigned by the ISP (Internet Service Provider)

Public IP Address is basically of two types:

Q13.What is subnetting? What is Network Id? Why do we use classless addressing?
Dividing a large block of addresses into several contiguous sub-blocks and assigning these sub-blocks to different smaller networks is called subnetting. It is a practice that is widely used when classless addressing is done.

A subnet or subnetwork is a network inside a network. Subnets make networks more efficient. Through subnetting, network traffic can travel a shorter distance without passing through unnecessary routers to reach its destination.

Q14. What is 2FA? 
Two-factor Authentication refers to the use of any two self-reliant methods from the various authentication methods. Two-factor authentication is used to ensure that the user has been recognized to access secure systems and to increase the security. Two-factor authentication is first implemented for laptops because of the fundamental security liabilities in mobile computers. By the use of two-factor authentication, it becomes more difficult for unauthorized users to use a mobile device to access secure data or systems.

Q15. What is the difference between proactive and reactive measures?

Proactive RCA 
The main question that arises in proactive RCA is “What could go wrong?”. RCA can also be used proactively to mitigate failure or risk. The main importance of RCA can be seen when it is applied to events that have not occurred yet. Proactive RCA is a root cause analysis that is performed before any occurrence of failure or defect.

Advantages :

Disadvantages :

Reactive RCA :

The main question that arises in reactive RCA is “What went wrong?”. Before investigating or identifying the root cause of failure or defect, failure needs to be in place or should be occurred already. One can only identify the root cause and perform the analysis only when problem or failure had occurred that causes malfunctioning in the system.

Advantages :

Disadvantages :

Q16. What is Docker? 
Docker is an open-source containerization platform by which you can pack your application and all its dependencies into a standardized unit called a container. Containers are light in weight which makes them portable and they are isolated from the underlying infrastructure and from each other container. You can run the docker image as a docker container in any machine where docker is installed without depending on the operating system.

Docker is popular because of the following:

  1. Portability.
  2. Reproducibility.
  3. Efficiency.
  4. Scalability.

Q17. What is DNS? 
Domain Name System (DNS) is a hostname for IP address translation service. DNS is a distributed database implemented in a hierarchy of name servers. It is an application layer protocol for message exchange between clients and servers. It is required for the functioning of the Internet.

Q18. Diffrence between DevOPS and SRE

DevOPS

Site Reliability Engineering (SRE)

Software development and operations System reliability
Holistic, cultural, and mindset-driven Technical and software-first
A wider range of organizations More specialized, typically large tech companies
Break down silos, automate tasks, and improve communication between development and operations Ensure the reliability, scalability, and performance of IT systems
Continuous integration and delivery (CI/CD), infrastructure as code, and monitoring and observability Error budgeting, service level objectives (SLOs), and incident management

Q19. What is Multithreading in Operating System? 
A thread is a path which is followed during a program’s execution. Majority of programs written now a days run as a single thread.Lets say, for example a program is not capable of reading keystrokes while making drawings. These tasks cannot be executed by the program at the same time. This problem can be solved through multitasking so that two or more tasks can be executed simultaneously. Multitasking is of two types: Processor based and thread based. Processor based multitasking is totally managed by the OS, however multitasking through multithreading can be controlled by the programmer to some extent. The concept of multi-threading needs proper understanding of these two terms – a process and a thread. A process is a program being executed. A process can be further divided into independent units known as threads. A thread is like a small light-weight process within a process. Or we can say a collection of threads is what is known as a process.

Q20. What is Cloud Computing ? 
Cloud computing means storing and accessing the data and programs on remote servers that are hosted on the internet instead of the computer’s hard drive or local server. Cloud computing is also referred to as Internet-based computing, it is a technology where the resource is provided as a service through the Internet to the user. The data which is stored can be files, images, documents, or any other storable document.

DSA Problems

Problems

Practice

Implement two Stacks in an Array Solve
Remove all duplicates from a given string Solve
Kadane’s Algorithm Solve
Sort an array of 0s, 1s and 2s Solve
Zero Sum Subarrays Solve 
Triplet Sum in Array Solve
Next Permutation Solve
Intersection of two sorted Linked lists Solve
Add two numbers represented by linked lists Solve
Flattening a Linked List Solve
Check whether two Strings are anagram of each other Solve
The Celebrity Problem Solve 
Next Greater Element Solve
Stack using two queues Solve 
Max rectangle Solve 
Check for BST Solve
Diameter of a Binary Tree Solve
Mirror Tree Solve
ZigZag Tree Traversal Solve
K distance from root Solve
Left View of Binary Tree Solve
Lowest Common Ancestor in a BST Solve
0 – 1 Knapsack Problem Solve
Coin Change Solve 
Egg Dropping Puzzle Solve
Interleaved Strings Solve 
Unique BST’s Solve
Maximum Profit Solve
Detect cycle in an undirected graph Solve
Topological sort Solve
Rotten Oranges Solve
Minimum steps to reach target by a Knight Solve
X Total Shapes Solve 
Clone Graph Solve
Floyd Warshall Solve

System Design 

 


Article Tags :