Get prepared your "Solution Architect" interview!
Tags: solutionarchitect, solutiondesign, softwarearchitect, interview
Published: 2022-12-04 21:30:09

In this article, I aim to present the topics that can help in the job interviews of the positions related to solution architecture and software design, and to present a topic framework to prepare for.

By briefly talking about myself, I would like to indicate how I gathered my notes here from real world scenarios. Within the framework of my experience in the software development industry, I worked with international teams (business teams / development teams) and obtained technical interview experience that I can not remember the number of.
>  Gradually, I have witnessed that these technical interviews can also be classified. Although the discussion topics are determined in a correlation under the name of related positions and job descriptions and technical meetings are held, the progress and outcome of the negotiations is basically a matter related to the approach of the technical interview owner and candidate. Therefore, with a basic reference, being aware of the general concepts of solution architecture and solution development and being able to express ideas as if they were alive is an indispensable part of technical discussions. Even if the subjects are out of the context.

In general, when we consider theories and concepts holistically and practice some thinking around them, it will not be a surprise to get authentic and value-added results in technical discussions. With the answers we give and the dialog we catch, we can even start talking about the first tasks.

## **Soft questions and getting know each other**

This part is more likely about getting know each other and understand your personal characteristics. Yes. Personal characteristics. I think, this topic is getting more important day by day. Because, if you won’t work alone, the interviewer needs to understand your adaptation with the team. Recognising this is not easy for both side and sometimes, not fair as well. It is a fact that even in “professional” business life, your productivity should have a balanced state when it is compared with the teams’ productivity. This is not about being self driven. This is about being able to produce something “together”.

### **Consider yourself a colleague. How would you describe you in one word?**

Ask this question to yourself front of the mirror. What kind of feedback have you received so far? From whom? Was it reasonable? Are you aware of that feedback if it is true/read ? Was it an intentional act or real?

Yes, to be able to answer this question, we must be objective and find the real answer by detailed thinking, And trust me, it is very good idea to be get prepared this question when you are having cup of tea.

Being solution oriented, hypercritical, strong business acumen, driving towards requirements, trust building mindset, consideration of proof of concepts and examples in detailed.. These are good points to review and remembering your actions that helped teams/business. Give the message that you are not a blocker but driver forward.

### **Do you like to have discussions/talk about technologies in your spare time? How often?**

Your interests… A stable interest brings successful and up-to-date information. Success and Knowledge. Both is a must for employer. Even if they don’t have mechanisms to ensure their employees keep themselves up to date, employers need fresh knowledge with high energy. Basically, mentioning how to keep yourself updated from knowledge perspective would be great. Also, if you continuously join tech talks, community meet-up, joining online events, this kind of activities worth to mention. These are also valuable to give heads up that you invest time to keep the knowledge up to date. If you are asked as “What about lunch breaks?”… It is totally up to you. From my point of view, I don’t prefer to talk about tech or work related things in my lunch break. It is a “reload” time.

### **When designing a solution/working on a solution, which personal characteristics do you think will help you the most?**

I don’t think this is a question that should or should be asked directly. But it is a question that the interviewer should have an idea about the candidate. Again, in order to adapt, integrate and walk together towards the same goal.. We must be able to express that we are empathetic, determined and problem-solving. Also, I’d like to leave a tip. Making controlled assumptions and/or avoiding assumptions as much as possible… This is a very important issue. An issue that affects productivity and resource management. I have witnessed many times that it is too late to reach the same conclusions by holding meetings over and over again saying “Let’s have a talk, Let’s have a meeting”, and in fact, the issues that were clear months ago are crushed and ignored due to wrong assumptions. Therefore, one of the important issues is to approach assumptions in a controlled manner. You should avoid assumptions as much as possible!

Another issue to consider is team work. “To adapt to teamwork, to be able to work, to work with the team”. So how many teams are the there? Size? Are they Agile? Metrics? How much does onboarding for a new employee take as average? What are their levels? How do they integrate with each other? Have you had a problem? How did you solve it? How do you approach? While making these explanations, give clues about your personality. Approaching professionally is in favor of the employee in every sense. It should not be forgotten that everyone is just a resource and you are selling your time using your knowledge.

Lastly, I wanted to mention; It’s about being proactive and working on multiple tasks at the same time. In these matters, the employer/interviewer should be as honest as the candidate. In general, the budget is different for all jobs, the agreed time for delivery is different. According to one scenario, it may not be considered proactive for the person who is not advancing more than one job at the same time. I think this is wrong. Being proactive and Multi-tasking are two different things. I generally discuss these two issues and clarify my approach. I have witnessed many times that being proactive for a particular task is much more efficient, and that trying to advance more than one job at the same time brings more loss than benefit. You can also multi-task individually, but is your team suitable for it? Think about it, you are starting 10 jobs and you are trying to progress, but the team can take 1–2 or the Business team, who wants 10 different jobs to start, can’t answer… But why? Investments… Evaluate these and be clear. Of course, if you enjoy chaos, that’s another matter :)

### **Do you like coding?**

Do you like to code as a solution architect? This question is actually about understanding whether you are a conceptual solution architect or a solution architect with a technical background with hands-on experience rather than understanding how much you like to code. The interviewer might also want to know if you like coding or not :) However, from my point of view, it’s mainly to understand the technical background and whether you can evaluate your solutions using technologies of a high level programming language.

If you have some technical background and coding experience professionally, I bet you can cover this section. But if the position is about conceptual solution architecture, this position might be more closer to business teams and delivery teams rather than technical teams. Anyways, you should have technical understanding and being able to have technical discussions with technical teams. So, mentioning about your coding skills with some real world scenarios would be beneficial. Consider to evaluate items below:

* Understanding code snippets

* Coding for PoC purposes

* Being able to read code

* Understanding what “compiling” means

* Understanding what “script language” means

* Understanding complexity and cohesion topics on functionalities

* Understanding what is integration

* Understanding what is API ?

### **While developing/designing technical solutions, how do you deal with uncertainty?**

Your message with this question will also include facilitating methods you use as you develop your time management skills and flexible solutions. Because the solutions you design may be solutions that will guide a team and/or start and end corporate projects as soon as possible. Being agile requires flexibility and the most efficient use of time. Technically, the issues that I find useful to talk about are as follows. It will also be to your advantage to share your experiences using them with real world scenarios.

* Mocking the data

* Contracting between systems — API and services

* Agreeing with providers/customers for fake proxies

* Following up possible changes and align with technical teams

* Raise uncertain points and mark them to follow up

* Consideration of KISS, DRY and YAGNI with functional designs as well.

### **Have you ever been part of a failed project?**

Learning.. Even in failed project, it is fact that there is a gain. The gain is learning. Within your position and actions that you had taken, importance of this increases but not decrease. Sharing your point of view about what was the reason of that fail within professionalism is crucial. Accordingly, the learning what you gained should be shared with clarification and example if possible. Also, if you have ideas, would be great if you share what were the technical reasons for the failure and how it could be avoided. And you can harmonize your learning and your point of view as a summary.

### **How would you describe the role of the Solution Architect?**

Describe it. From my point of view, mentioning about technology solutions, customer, business and business requirements are crucial in description. Because this position is some sort of a bridge between business and technical teams. And, it worths to consider interpreter role of this position between teams/multi-functional teams. For technical-heavy positions, don’t forget to involve engineering disciplines in your description as well.

### **Mention about solution architect projects from your portfolio**

In your speech here, it will be to your advantage to talk about the technologies you use and also the important concepts in creating solutions, in addition to the industries for which your projects were developed. By aiming to talk about your area of ​​expertise in a very concise way, you will give the interviewer an idea about your knowledge. In this way, the interviewer can ask more specific questions about the topics you mentioned, with the notes he/she has taken.

In addition, by identifying the key words in the job description you have applied for and/or presented to you, you can express to the interviewer why you are in this interview by linking your speech with these key words.

I would like to list some important topics here. Please consider them individually and be prepared as to which ones you evaluate/use in your projects and why.

* Scalability

* Elasticity

* Serverless

* Background workers

* Parallelism

* Security

* Authentication

* Infrastructure Automation / Infrastructure as a Code ( IaaC )

* CI/CD

* SaaS

* Documentation

* Integration

### **What can a solution architect do to help functional designers/analysts?**

In fact, solution architect can help business analysts/functional designers in many areas. But this depends on team structure and way of working with technical and business teams.

So far, many times, I have observed companies expect functional designs/solution architecture/business analysis from solution architect. Yes, this is true. That is why, I wanted to remark this topic here. companys’ lack of experience doesn’t mean that you need to take responsibility in many areas. That worths if you clearly understand what will be expecting from you. Just to be in the same page.

On the other hand, at the same time I have observed that working very efficiently is possible together with analysts and designers. Since they are knowledgeable, as a solution architect you would have chance to see how your solution works for the business cases in demand. Especially for proof of concepts, you would see possible bottlenecks in advance and have a chance to make them reach a better solution. Collaboration!

Also, as a solution architect, you can raise possible drawbacks in advance whenever you see on the functional design in complex systems. For example, if the solution is a messaged based solution but if you see a function that doesn’t match with a messaging based solution, you can explain how the expected system works and you all reflect this to functional design as well. For example, on the design, if you see that OTP will be sent from user interface to end user, this wouldn’t be precise explanation of the solution. But, the description below would explain the flow better.
>  OTP ( One time password ) will be sent by notification service to end-user when the end-user initiated login from login component.

So here what we observe about how SA can help analysts/functional designers:

- About knowledge sharing in infrastructure level
- Explaining business flow within solution design
- On roles and responsibility within components
- Explaining available and new solution designs such as diagrams, sequence diagrams
- To make alignment on functional requirements and solution designs

And don’t forget, as a Solution Architect, you have right to reject analysis and functional designs if they don’t match available solution architecture or if it has some bad practices. And, that feeds the collaboration if SA provides clear explanation/diagram/solution about why reject is placed.

## System Design and Conceptual (Why?) Questions

### **What does the CAP Theorem actually say?**
>  The CAP theorem is a belief from theoretical computer science about distributed data stores that claims, in the event of a network failure on a distributed database, it is possible to provide either consistency or availability — but not both.

The CAP ( *Consistency, Availability, Partition *) acronym corresponds to three guarantees. This theorem has created the base for modern distributed computing approaches.

Besides, There is one more acronym: *BASE* properties are the common properties of recently evolved NoSQL databases.

According to CAP theorem, a BASE system **does not guarantee consistency**. This is a contrived acronym that is mapped to following property of a system in terms of the CAP theorem:

* ***Ba**sically available indicates that the system is guaranteed to be available*

* ***S**oft state indicates that the state of the system may change over time, even without input. This is mainly due to the eventually consistent model.*

* ***E**ventual consistency indicates that the system will become consistent over time, given that the system doesn’t receive input during that time.*

### **What is meant by [architectural risk](https://simplicable.com/) and how can it be mitigated?**

Let's review an example of Architectural Risk.

**Definition: **An architectural design that fails to meet project requirements

**Case: **A technology project built on top of a platform/product that is unstable and inflexible leading to development failures. Not possible to scale and does not have stability for consumers.

**Risk Treatments**

* Risk Avoidance practices

* Risk Reduce practices

* Risk Transfer practices

* Risk Acceptance practises

**Related Concepts**

* Enterprise Architecture

* Information Architecture

For a specific case and/or on general architecture, we can run [Risk Management Process Architecture](https://grc2020.com/) that ensures multiple steps as follows.

* Risk identification

* Risk assessment

* Risk treatment

* Risk monitoring

* Risk communications & attestations

So basically, within practices above, possible to foresee how mitigation can be applied for the cases which is analysed with a process.

### **Any idea what is "Starvation"?**

Starvation is the issue/problem that occurs when processes in high priority keep executing and processes in low priority get blocked for indefinite time. In overloaded computer system, a steady stream of higher-priority processes can prevent a low-priority process from ever getting the CPU.

A real live example may be this one: Imagine you’re in a queue to purchase food at a restaurant, for which pregnant women *have higher priority*. And there’s just a whole bunch of pregnant women arriving all the time. You’ll soon be starving.

A possible solution to starvation is to use a scheduling algorithm with priority queue that also uses the [aging technique](https://en.wikipedia.org/wiki/Starvation_(computer_science)).

### What is the benefit of using APIs?
>  A solution to open your business to consumers through internet. ( SaaS )

* It allows applications and system components to communicate with each other on internal networks as well as over the Internet.

* It became integral to enterprise efforts to make internal applications and services accessible over the Internet to customers, partners, suppliers, and other third parties.

### Using CDN is necessary?

We could think of a CDN like an ATM. CDN is not necessary but using CDN is of great use. CDNs cache content like web pages, images, and video in proxy servers near to your physical location. This allows you to do things like watch a movie, download software, check your bank balance, post on social media, or make purchases, **without having to wait for content to load.**

### Why we need to use MapReduce with big data?

MapReduce is suitable for **iterative computation involving large quantities** of data requiring parallel processing. It represents a **data flow** rather than a procedure. It’s also suitable for **large-scale graph analysis** since it was ****originally developed for **determining PageRank of web documents**.
>  MapReduce works on any problem that is made up of **exactly 2 functions at some level of abstraction.** The first function is is applied to each of the items in the input set, and the second function aggregates the results.

### What is meant by *lower latency interaction*?

Low latency means that there is **very little** delay between the time you request something and the time you get a response. Basically it describes a computer network that is optimized to process a very high volume of data messages with minimal delay as much as possible.

Best practices for low latency systems:

* Avoid I/O and keep it all in memory

* Keep your reads sequential

* Avoid iterative transactions on data manipulation, batch your writes.

* Keep data and processing co-located.

* Keep the system low utilized.

* Avoid context switches as much as possible.

* Use caching, especially data caching.

* Async and non-blocking as much as possible

* Use parallelization for processors and I/O that can happen in parallel.

### What does “System Shall Be Resilient” mean?

This applies not only to highly available systems. Any system that is not resilient will be unresponsive after a failure. System is resilient if it stays responsive in the face of failure. The client/consumers of a component is not burdened with handling its failures.

* **Replication**: By replication for the necessary parts, high availability is ensured.

* **Containment**: Failures are contained within each dependent or independent component.

* **Isolation**: Components are isolated to ensure that parts of the system can fail and recover without compromising the system as a whole.

* **Delegation**: If any components fails, recovery of each component is delegated to another component.

### How to avoid "cache miss-storm"?

To prevent this, we need to ensure expiration practices. Not just wiht one expiration key. We should have soft and hard expiration date. Lets assume the hard expiration date is 1 day, and the soft 1 hour.

* Option 1: The hard is one actually set in the cache server, the soft is in the cache value itself.

* Option 2: The hard is one actually set in the cache server, the soft is another one in the cache server.

### What does "Eventually Consistent" mean?

Eventual Consistency is a guarantee that when an update is made in a distributed database, that update will **eventually be reflected in all nodes that store the data**, resulting in the same response every time the data is queried. Especially in distributed systems, evaluating this mechanism with some data caching practises would be one of the best practices.

### What does the expression "Fail Early" mean?

Basically, when there is a problem, the software fails as soon as and response as visibly as possible. From resource consumption perspective, it is advantageous but it won't help reduce bugs at first.

### What is ACID property of a system?

ACID is a acronym which is commonly used to define the properties of a relational database system, it stand for following terms. **Atomicity** guarantees that if one part of the transaction fails, the entire transaction will fail, and the database state will be left unchanged. **Consistency** ensures that any transaction will bring the database from one valid state to another. **Isolation** ensures that the concurrent execution of transactions results in a system state that would be obtained if transactions were executed serially. **Durable or Durability **means that once a transaction has been committed, it will remain so, even in the event of power loss.

### Why do we need clustering?

The main purpose of clustering is to achieve 100% availability or a zero down time in service. Doing clustering does not always guarantee that service will be 100% available since **there can still be a chance that all the machine in a cluster fail at the same time.** However it in not very likely in case you have many machines and they are located at different location or supported by their own resources. **It reduces the risk dramatically.**

### Why layering your application is important?

Each component should contain layers a dedicated object for the **Web (or API)**, **logic** and **data access ( + infrastructure )** code. **This is not only about a clean separation of concerns **but also significantly **eases mocking and testing the system.** As a bad layering example, if we consider a component which keeps all in a layer, this could bring very high complexity from quality, testing and root cause analysis. But advantage could be as delivery related matters.

### What is the difference between Cohesion and Coupling?

Cohesion represents the relationship within a module. Coupling represents the relationships between modules. Increasing cohesion is good for software. Increasing coupling is avoided for software. [See also](https://topuzas.medium.com/complexity-an-unwished-experience-in-scaling-and-maturity-phases-3302fddc09fd).

### What are heuristic exceptions?

Heuristic exceptions signal undesired / unwanted and possibly inconsistent outcomes of the two-phase commit protocol. Even with a transaction manager and full crash recovery, heuristics are possible due to timeouts in various subsystems or resources. [See also](https://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/TransactionJTA_Overview-Heuristic_exceptions.html).

### What is meant by "Shared Nothing" architecture?

A type of distributed architecture. A shared-nothing architecture is a distributed (distributed computing) architecture in which each update request is satisfied by a single node (processor/memory/storage unit) in a computer cluster. The intent is to **eliminate “contention” **among nodes. Nodes **do not share (independently access)** the same memory or storage.

### Are you familiar with "The Twelve-Factor App" principles?

The twelve-factor app is a methodology for building software-as-a-service apps that applies some set of principles/standards. [See also](https://12factor.net/).

* Codebase

* Dependencies

* Config

* Backing services

* Build, release, run

* Process

* Port Binding

* Concurrency

* Disposability

* Dev/Prod parity

* Logs

* Admin processes

### What do you mean by "Session Affinity"?

**Sticky session** or a **session affinity** technique is another **popular** load balancing technique that requires a user session to be always **served** by an **allocated machine**.

In a load balanced server application where user information is stored in session it will be required to keep the session data available to all machines. **This can be avoided by always serving a particular user session request from one machine.** The machine is associated with a session as soon as the session is created. **All the requests in a particular session are always redirected to the associated machine.** This ensures the user data is only at **one machine** and **load is also shared**. This mechanism is typically achieved by using **SessionId** cookie. The cookie is sent to the client for the first request and every subsequent request by client must be containing that same cookie to identify the session.

There might appear some issues by this mechanism.

* The client browser may not support cookies, and your load balancer will not be able to identify if a request belongs to a session. This may cause strange behavior for the users who use no cookie based browsers.

* In case one of the machine fails or goes down, the user information (served by that machine) will be lost and there will be no way to recover user session.

### What could be one of the best practices to manage the case where two customers add in the same time a product whose the stock was only 1?

There is no perfect answer for this question and all depends on details but for sure there are some options to evaluate.

* **Defense.** This could be avoiding to sell low stock products.

* **Reservation mechanism.** Reserve an item for the customer for a fixed time for example 10 minutes after they have added it to the basket. After that time it needs to be rechecked for the available stock or start again. This is often used to ticket to events or airline seats

* **Final check before purchase.** One of the best way is to do a final check right before the payment, when the order is actually placed. In worst case you have to tell you customer that you where running **out of stock** right now and **offer alternatives** or **discount/payment coupon**.

* **Trying to fulfil both orders later for low stock products.** Just cause you don’t have stock right now, doesn’t mean you can’t find it in an emergency.

One of them or harmonising some of them together have the issue resolved efficiently.

### What is the most accepted transaction strategy for microservices?

Isolation: The most common approach is to isolate microservices as much as possible. As much as possible, considering them as single units. And, then transactions can be managed in context of the service as a whole. We can implement a rollback mechanism that un-does the original operation, or a 2-phase commit system that reserves the original operation until told to commit to finalise transaction successfully.

### What could be the benefits of cloud based disaster recovery?

Cloud based disaster recovery is very preferable by its platform level advantages and at the same time, it helps to reduce human centric risks dramatically.

Cloud based disaster recovery brings **flexibility and reduced downtime**. That helps you get systems back online much quicker during an IT disaster, minimizing the manual processes of traditional recovery methods.

**Reliability** is also very important in disaster recovery. This allows organisations/teams to test recovery point and recovery time objective highly accurately, which strengthens your disaster recovery plan more precisely.

For sure, to be able to manage these things easily, **simplification and efficiency** are also matters. For example, allowing users remote access to necessary systems, manage systems online or by tools. A cloud model offers consistency and simplified management and support.

**Ease of deployment** could be also one anvandategous point. Without much training or adding head count, teams can get started without significant investments in hardware, software, or a secondary site. A final advantageous point could be

**Cost-effectiveness**. Many cost advantage is available. For example, pay-as-you go and/or pay-as-you-grow.

### How would you explain cloud computing to non-technical customer?

Simply put, your email travels through a “cloud” of multiple Internet connections. So it started, as the Internet grew, all connections on the Internet came to be known as the “cloud”. Over time something else happened as technology never stops, the “cloud” got smarter.

### How would you explain what an API is to a non-technical customer?

API is an acronym. APIs are big part of the web and very technical term. Basically, an API (Application Programming Interface) is a software-to-software interface that enables two applications to exchange data among each other. APIs are provided for various levels of the software development process.

### What is meant by "Cloud Load Balancing"?

Cloud load balancing is the **process of deploying workloads to computing resources in a cloud computing environment** and **carefully balancing the network traffic** that accesses all these resources.

### Which security approach do you evaluate in your solutions?

The main concept here to answer requirements about authentication and authorization. To be able to provide applications in this manner, the mechanisms below can be considered:

* Email Authentication

* Two-Factor Authentication

* Role management & Role based access token

* Verification processes

* Force password renewal

* Token generation for Machine 2 Machine communication

* JWT and Claims based authentication

### How do IT solutions architects diagnose performance issues?

It is about numbers, graphical statistics and well presentation technics. And also, to be able to evaluate the numbers efficiently, having possibility to track things holistically or specific components are also beneficial.

* Metrics

* Logs and Log monitoring

* Monitoring tools

* Load tests

### Why do we need caching?

A cache’s **primary purpose** is to increase data retrieval performance by reducing the need to access the underlying slower storage layer. **Trading off capacity for speed, a cache typically stores a subset of data transiently, in contrast to databases whose data is usually complete and durable.** Lowers the repeat of communication between servers. Responses with cached data without re-process for the requests repeated with same content.

### If you go to https://[www.websitename.com](http://www.google.com) , what happens?

Very common and basic question to hear some conceptual knowledge about networking knowledge. [See also](https://aws.amazon.com/blogs/mobile/what-happens-when-you-type-a-url-into-your-browser/).

* Schema, path and other parameters identification

* Browser looks up IP address for the domain ( DNS Lookup )

* Browser initiates TCP connection with the server

* Browser sends the HTTP request to the server

* Server processes request and sends back a response

* Browser renders the content

## Coding & Code Design & Data Related Questions

### What is the difference between Monolithic, SOA and Microservices Architecture?

**Monolithic Architecture** is similar to a big container wherein all the software components of an application are assembled together and tightly packaged.

A **Service-Oriented Architecture** is a collection of services which communicate with each other. The communication can involve either simple data passing or it could involve two or more services coordinating some activity.

**Microservices Architecture** is an architectural style that structures an application as a collection of **small autonomous services**, **modeled around a business domain**.

As you may imagine, from top to bottom, it is about having independent parts (services) from each other as much as possible.

* Model-ed around business domain, a collection of small autonomous services instead a big container where all things tightly coupled with each other.

### What does "API-first development" mean?

* A new model of software development

* Applications are conceptualised and built as an interconnection of internal and external services through APIs.

* Agree on contract and implement API and meanwhile, implement UI based on agreed contract ( REQ/RES model )

* Separate UI tests and API tests based on agreed contract

Well, It brings pretty flexibility and teams/team members wouldn't have any blocker in design, development, testing and delivery phases.

[See also.](https://swagger.io/resources/articles/adopting-an-api-first-approach/)

### What is difference between DDD and Clean Architecture?

* In Clean/Hexagonal/Onion architectures, the main aim of this decoupling is testability and modularity.

* In DDD, the main goal is to establish common language with the business experts. Our code becomes a business related language by definition of business related code members. Business domain specific language.

### What is GOD class and why should we avoid it?

The most efficient way to break and make applications non-developable is to create GOD classes. These classes are classes that follow a lot of information and have various responsibilities. Areas of influence are very high. They have high dependencies. It has high complexity. A code change will most likely affect other parts of the class and therefore indirectly all other classes that use it. This leads to an even greater maintenance mess, because no one dares to make any changes to it other than adding new functionality. Testability will become less and less possible. Therefore, it becomes a non-developable application.

[See also.](https://en.wikipedia.org/wiki/SOLID)

### What is meant by "*program to interfaces, not implementations*" mean?

**Coding against interface** means, the client code always holds an "interface" object which is supplied by a "factory". Any instance returned by the **factory** would be of type **interface** which any factory candidate class must have implemented. **In this way, the client app is not worried about implementation and the interface signature determines what all operations can be done. **This approach can be used to change the behaviour of a program at run-time as well.

* Brings high testability

* High cohesion, loose coupling

* Low maintenance

* Well defined exception/error handling

### What’s the difference between principles YAGNI and KISS?

* **YAGNI (You ain't gonna need it)** : Should be careful not to include your own requirements so that you don't taint your customer needs. **YAGNI grows from too much future anticipation.**

* **KISS (Keep it simple stupid): **Keep the things simple. Otherwise it requires more time and more knowledge to implement. **KISS is a strategy to keep the things simple.**

### What are the advantages of NoSQL over traditional RDBMS?

NoSQL is better than RDBMS because of the following reasons:

* Faster development life cycles for developers

* Does not require schema

* Horizontal scalability can be achieved easily

* Supports semi-structured data and volatile data

* Supports Bigdata in volumes of Terra Bytes & Peta Bytes

* Provides well-enough support for Analytic tools

* Can be hosted in cheaper hardware machines

* In-memory caching option is available

* Read/Write throughput is very high

RDBMS is better than NoSQL for the following reasons:

* Transactions with **ACID** properties ( See "**What is ACID of a system?**" above )

* Adherence to strong schema of data being written/read

* Real time query management ( in case of data size < 10 Tera bytes

* Execution of complex queries involving join & group by clauses

Relational databases enforce **ACID**. So you will have schema based transaction oriented data stores. Proven and suitable for 99% of real world applications. **You can do practically anything with relational databases.**

However, **there are limitations to speed and scaling when it comes to large high-availability data stores.** For example, **Google** and **Amazon** have terabytes of data stored in large data centers. **Query and insert are not successful in these scenarios due to the blocking/schema/transactional nature of RDBMs.** This is why they implement their own databases **(actually key-value stores)** **for huge performance gains and scalability.**

Generally, if you need a NoSQL db, possible reasons are:

* If the client wants 99.999% availability on a high traffic site

* If required data structure doesn’t make sense in SQL

* If it breaks the relational model and if that stores denormalised data, and/or if you create external directories to search for that data

### What are the downsides of "Sharding" ?

**Sharding** is an architectural approach that distributes a single logical database system to a cluster of machines. Basically, it is Horizontal partitioning design scheme.

In this database design, the rows of a database table are stored separately instead of being split into columns (as in **normalization** and **vertical partitioning**). Each partition is called a shard, which can reside independently on a separate database server or physical location.

**Sharding** makes a database system highly scalable. The total number of rows in each table in each database is reduced since the tables are divided and distributed into multiple servers.

This reduces the index size, which generally means improved search performance. The most common approach for creating shards is by the use of consistent hashing of a unique id in application.

The downsides of "**Sharding**":

* Any addition or deletion of nodes from system will require some rebalance to be done in the whole platform/system.

* Requires application to be aware of the location of the data.

* Iterative/repeated cross node join queries brings very poor performance.

* A wrong "**Sharding**" logic may result in worse performance.

### How would you explain deadlock to 7 years old?

Ahmet and Ayse share a sparse kitchen with only one of everything. They both want to raise a glass at the same time. They each need a slice of bread and each needs a knife, so they both go to the kitchen to get the loaf of bread and the knife.

* First, Ahmet buys the knife, while Asye takes the loaf of bread first.

* Now Ahmet tries to find the loaf of bread and Ayse tries to find the knife.

* However, they both realize that what they need to finish the task is already in use.

* If they both decide to wait until what they need is no longer used, they will wait for each other forever.

* Lock ( **Deadlock** ).

### What’s the difference between "Deadlock" and "Livelock"?

A **livelock** is similar to a deadlock, except that the states of the processes involved in the livelock constantly change with regard to one another, none progressing. Livelock is a special case of **resource starvation**; the general definition only states that a specific process is not progressing.

Deadlock detection and recover algorithms can be also reason for livelocks. If more than one “process” takes action, the “deadlock detection” algorithm can be repeatedly triggered. This can be avoided by ensuring that only one process takes action by choosing randomly or by priority.

### What is the difference between "Concurrency" and "Parallelism"?

**Concurrency** is when x amount tasks can **start**, **run**, and **complete** in **overlapping** time **periods**. It doesn’t necessarily mean they’ll ever both be running **at the same instant**. For example, *multitasking* on a single-core machine. **Parallelism** is when tasks literally run at the same time, e.g., on a multicore processor.

For example, a barkeeper is able to accept orders from several customers while he can only prepare one order at a time. **So, barkeeper provides concurrency without parallelism.**

### Is there any difference between a Binary Semaphore and Mutex?

* A **mutex** can be released only by **the thread that had acquired it.**

* A **binary semaphore** can be **signaled** **by any thread** (or process)

### Is there any difference between "Task" and "Thread" ?

The thread class is used for creating and manipulating a thread in operating system level. A Task represents some asynchronous operation and is part of the **Task Parallel Library**, a set of APIs for running tasks asynchronously and in parallel. The task can return a result.

### What is the difference between Asynchronous and Parallel programming?

* When it runs something **asynchronously** it means it is non-blocking. It executes without waiting for completion and carry on with other things.

* **Parallelism** means to run multiple things at the same time, in parallel. Parallelism works well when you can separate tasks into independent pieces of work.

* **Async** and **Callbacks** are generally a mechanism to express **concurrency** i.e. a set of entities possibly talking to each other and sharing resources.

## Testing

### How do you guarantee software quality and reliability?

Software reliability is the probability that a computer constraint a given dataset will run error-free for a certain period of time. Reliability is a customer-oriented view of software security.

The quality of software is defined as a field of study, practice and application that defines the desired features of software products. It has 2 main approaches.

* [Defect management](https://www.guru99.com/defect-management-process.html)

* [Quality attributes](https://www.softwaretestinghelp.com/what-are-the-quality-attributes/)

**Reliability Testing** is a testing technique involved in testing a software’s operating environment and specific deployment conditions that help reveal groups in software design and environments.

Regulators as a type of software testing whether the storage can perform an error-free operation in a given cell for a certain period of time. **It ensures that the product is error free and reliable for its intended use.**

Purposes of Reliability Test

* Finding the permanent nature of repeated deficiencies/bugs.

* There is a certain period of time for faults to be found.

* The main point of view of failure.

* Performs performance tests of various software product modules after fixing bugs.

Reliability Test Types

* Load testing is done to determine if the application can support the required load without failing. It is done to check the performance of the software under maximum workload.

* Feature Testing: This test takes place in the following three steps:
Every function in the software must be run at least once.
The interaction between two or more functions should be reduced.
Each function must be properly executed.

* Regression testing basically ends up making sure no new bugs are introduced in detail with any new functionality additions, old functionality being removed or a hardware bug fixed, details of new items or the end of previous bugs.

## Additionally

Here some urls that can help to explore real world scenarios, reference architecture examples and diagrams

* [AWS Architecture Center](https://aws.amazon.com/architecture/)

* [Azure Architectures](https://learn.microsoft.com/en-us/azure/architecture/browse/)

* [10 Important Cloud Migration Case Studies You Need to Know](https://distillery.com/blog/cloud-migration-case-studies/)

* [On-premises to Cloud Migration](https://www.teradata.com/Trends/Cloud/On-Premises-to-Cloud-Migration)

[See also](https://www.amazon.com/System-Design-Interview-insiders-Second/dp/B08CMF2CQF).

### Especially first case at that book: Scale from zero to millions of users

* Single server setup

* Scaling

* Load balancer

* Database replication

* Caching

* CDN

* Stateless Web tier

* Statful Architecture

* Data centers

* Message Queue

* Logging metrics and Isolation

* DB Scaling

Basically, that explains well defined all related topics within real world examples and basically:

* Keep web tier stateless

* Build redundancy at every tier

* Cache data as much as you can

* Support multiple data centers

* Host static assets in CDN

* Scale your data tier by sharding

* Split tiers into individual services

* Monitor your system and use automation tools

## Final words

Dear reader, I believe this article/outline/topics list helps you get through your interview passed very well.

Wish you good luck!