Giter Site home page Giter Site logo

yasir2000 / software-architecture-interview-questions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devinterview-io/software-architecture-interview-questions

0.0 0.0 0.0 8 KB

๐ŸŸฃ Software Architecture Interview Questions Answered to help you get ready for your next Design Patterns & System Architecture interview.

Home Page: https://devinterview.io/

software-architecture-interview-questions's Introduction

๐Ÿ–ฒ Top 70 Software Architecture interview questions (answered) for developers in 2021

Check our list of essential Software Architecture interview questions and answers that will trend on Design patterns & System Architecture interviews in 2021.



You can also find all 70 answers here ๐Ÿ‘‰๐Ÿผ https://devinterview.io/design/softwareArchitecture-interview-questions


๐Ÿ”น 1. What Is Load Balancing?

Answer:

Load balancing is simple technique for distributing workloads across multiple machines or clusters. The most common and simple load balancing algorithm is Round Robin. In this type of load balancing the request is divided in circular order ensuring all machines get equal number of requests and no single machine is overloaded or underloaded.

The Purpose of load balancing is to

  • Optimize resource usage (avoid overload and under-load of any machines)
  • Achieve Maximum Throughput
  • Minimize response time

Most common load balancing techniques in web based applications are

  1. Round robin
  2. Session affinity or sticky session
  3. IP Address affinity
Source:ย fromdev.comย  ย 


๐Ÿ”น 2. What Is CAP Theorem?

Answer:

The CAP Theorem for distributed computing was published by Eric Brewer. This states that it is not possible for a distributed computer system to simultaneously provide all three of the following guarantees:

  1. Consistency (all nodes see the same data even at the same time with concurrent updates )
  2. Availability (a guarantee that every request receives a response about whether it was successful or failed)
  3. Partition tolerance (the system continues to operate despite arbitrary message loss or failure of part of the system)

The CAP acronym corresponds to these three guarantees. This theorem has created the base for modern distributed computing approaches. Worlds most high volume traffic companies (e.g. Amazon, Google, Facebook) use this as basis for deciding their application architecture. It's important to understand that only two of these three conditions can be guaranteed to be met by a system.

Source:ย fromdev.comย  ย 


๐Ÿ”น 3. Define Microservice Architecture

Answer:

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

Source:ย lambdatest.comย  ย 


๐Ÿ”น 4. Why use WebSocket over Http?

Answer:

A WebSocket is a continuous connection between client and server. That continuous connection allows the following:

  1. Data can be sent from server to client at any time, without the client even requesting it. This is often called server-push and is very valuable for applications where the client needs to know fairly quickly when something happens on the server (like a new chat messages has been received or a new price has been udpated). A client cannot be pushed data over http. The client would have to regularly poll by making an http request every few seconds in order to get timely new data. Client polling is not efficient.

  2. Data can be sent either way very efficiently. Because the connection is already established and a webSocket data frame is very efficiently organized, one can send data a lot more efficiently that via an HTTP request that necessarily contains headers, cookies, etc...

Source:ย stackoverflow.comย  ย 


๐Ÿ”น 5. What do you mean by lower latency interaction?

Answer:

Low latency means that there is very little delay between the time you request something and the time you get a response. As it applies to webSockets, it just means that data can be sent quicker (particularly over slow links) because the connection has already been established so no extra packet roundtrips are required to establish the TCP connection.

Source:ย stackoverflow.comย  ย 


๐Ÿ”น 6. What Is Scalability?

Answer:

Scalability is the ability of a system, network, or process to handle a growing amount of load by adding more resources. The adding of resource can be done in two ways

  • Scaling Up
    This involves adding more resources to the existing nodes. For example, adding more RAM, Storage or processing power.
  • Scaling Out
    This involves adding more nodes to support more users.

Any of the approaches can be used for scaling up/out a application, however the cost of adding resources (per user) may change as the volume increases. If we add resources to the system It should increase the ability of application to take more load in a proportional manner of added resources.

An ideal application should be able to serve high level of load in less resources. However, in practical, linearly scalable system may be the best option achievable. Poorly designed applications may have really high cost on scaling up/out since it will require more resources/user as the load increases.

Source:ย fromdev.comย  ย 


๐Ÿ”น 7. Why Do You Need Clustering?

Answer:

Clustering is needed for achieving high availability for a server software. The main purpose of clustering is to achieve 100% availability or a zero down time in service. A typical server software can be running on one computer machine and it can serve as long as there is no hardware failure or some other failure. By creating a cluster of more than one machine, we can reduce the chances of our service going un-available in case one of the machine fails.

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.

Source:ย fromdev.comย  ย 


๐Ÿ”น 8. What Is A Cluster?

Answer:

A cluster is group of computer machines that can individually run a software. Clusters are typically utilized to achieve high availability for a server software. Clustering is used in many types of servers for high availability.

  • App Server Cluster
    An app server cluster is group of machines that can run a application server that can be reliably utilized with a minimum of down-time.
  • Database Server Cluster
    An database server cluster is group of machines that can run a database server that can be reliably utilized with a minimum of down-time.
Source:ย fromdev.comย  ย 


๐Ÿ”น 9. What is Domain Driven Design?

Answer:

Domain Driven Design is a methodology and process prescription for the development of complex systems whose focus is mapping activities, tasks, events, and data within a problem domain into the technology artifacts of a solution domain.

It is all about trying to make your software a model of a real-world system or process.

Source:ย stackoverflow.comย  ย 


๐Ÿ”น 10. What defines a software architect?

Answer:

An architect is the captain of the ship, making the decisions that cross multiple areas of concern (navigation, engineering, and so on), taking final responsibility for the overall health of the ship and its crew (project and its members), able to step into any station to perform those duties as the need arises (write code for any part of the project should they lose a member). He has to be familiar with the problem domain, the technology involved, and keep an eye out on new technologies that might make the project easier or answer new customers' feature requests.

Source:ย stackoverflow.comย  ย 


๐Ÿ”น 11. What is meant by the KISS principle?

Answer:

KISS, a backronym for "keep it simple, stupid", is a design principle noted by the U.S. Navy in 1960. The KISS principle states that most systems work best if they are kept simple rather than made complicated; therefore simplicity should be a key goal in design, and that unnecessary complexity should be avoided.

Source:ย stackoverflow.comย  ย 


๐Ÿ”น 12. Why is it a good idea for โ€œlowerโ€ application layers not to be aware of โ€œhigherโ€ ones?

Answer:

The fundamental motivation is this:

You want to be able to rip an entire layer out and substitute a completely different (rewritten) one, and NOBODY SHOULD (BE ABLE TO) NOTICE THE DIFFERENCE.

The most obvious example is ripping the bottom layer out and substituting a different one. This is what you do when you develop the upper layer(s) against a simulation of the hardware, and then substitute in the real hardware.

Also layers, modules, indeed architecture itself, are means of making computer programs easier to understand by humans.

Source:ย stackoverflow.comย  ย 


๐Ÿ”น 13. What does the expression โ€œFail Earlyโ€ mean, and when would you want to do so?

Answer:

Essentially, fail fast (a.k.a. fail early) is to code your software such that, when there is a problem, the software fails as soon as and as visibly as possible, rather than trying to proceed in a possibly unstable state.

Fail Fast approach wonโ€™t reduce the overall number of bugs, at least not at first, but itโ€™ll make most defects much easier to find.

Source:ย stackoverflow.comย  ย 


๐Ÿ”น 14. What does โ€œprogram to interfaces, not implementationsโ€ mean?

Answer:

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. This way the client program is not worried about implementation and the interface signature determines what all operations can be done.

This approach can be used to change the behavior of a program at run-time. It also helps you to write far better programs from the maintenance point of view.

Source:ย tutorialspoint.comย  ย 


๐Ÿ”น 15. What is Elasticity (in contrast to Scalability)?

Answer:

Elasticity means that the throughput of a system scales up or down automatically to meet varying demand as resource is proportionally added or removed. The system needs to be scalable to allow it to benefit from the dynamic addition, or removal, of resources at runtime. Elasticity therefore builds upon scalability and expands on it by adding the notion of automatic resource management.

Source:ย reactivemanifesto.orgย  ย 


๐Ÿ”น 16. What is Back-Pressure?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 17. WebSockets vs Rest API for real time data? Which to choose?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 18. What is the difference between Monolithic, SOA and Microservices Architecture?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 19. What Is Session Replication?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 20. What Is Middle Tier Clustering?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 21. How Do You Update A Live Heavy Traffic Site With Minimum Or Zero Down Time?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 22. What Is ACID Property Of A System?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 23. What Is Sticky Session Load Balancing? What Do You Mean By "Session Affinity"?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 24. What Do You Mean By High Availability (HA)?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 25. What does it mean "System Shall Be Resilient"?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 26. What is a Model in DDD?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 27. What is Domain in DDD?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 28. Explain the Single Responsibility Principle (SRP)?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 29. What is difference between fault tolerance and fault resilience?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 30. What is the difference between Concurrency and Parallelism?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 31. What is the difference between DTOs and ViewModels in DDD?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 32. What Is Load Balancing Fail Over?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 33. What are the DRY and DIE principles?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 34. What does SOLID stand for? What are its principles?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 35. Is it better to return NULL or empty values from functions/methods where the return value is not present?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 36. "People who like this also like... ". How would you implement this feature in an e-commerce shop?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 37. How can you keep one copy of your utility code and let multiple consumer components use and deploy it?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 38. Name some Performance Testing best practices

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 39. Name some Performance Testing metrics to measure

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 40. Two customers add a product to the basket in the same time whose the stock was only one (1). What will you do?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 41. Explain Failure in Contrast to Error

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 42. Provide Definition Of Location Transparency

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 43. What Is Sharding?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 44. Why layering your application is important? Provide some bad layering example.

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 45. What's the difference between principles YAGNI and KISS?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 46. What is GOD class and why should we avoid it?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 47. Why should you structure your solution by components?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 48. What Is BASE Property Of A System?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 49. Explain threads to your grandparents

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 50. How to handle exceptions in a layered application?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 51. Why should I isolate my domain entities from my presentation layer?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 52. What Is IP Address Affinity Technique For Load Balancing?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 53. What is actor model in context of a programming language?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 54. Defend the monolithic architecture.

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 55. What is Unit test, Integration Test, Smoke test, Regression Test and what are the differences between them?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 56. How do you off load work from the Database?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 57. Explain what is Cache Stampede

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 58. Compare "Fail Fast" vs "Robust" approaches of building software

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 59. What does Amdahl's Law mean?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 60. What is the most accepted transaction strategy for microservices?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 61. What is the difference between Cohesion and Coupling?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 62. Why is writing software difficult? What makes maintaining software hard?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 63. Are you familiar with The Twelve-Factor App principles?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 64. What are heuristic exceptions?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 65. What Does Eventually Consistent Mean?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 66. What Is Shared Nothing Architecture? How Does It Scale?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 67. How do I test a private function or a class that has private methods, fields or inner classes?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 68. What are best practices for caching paginated results whose ordering/properties can change?

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 69. Cache miss-storm: Dealing with concurrency when caching invalidates for high-traffic sites

๐Ÿ‘‰๐Ÿผ Check all 70 answers


๐Ÿ”น 70. Could you provide an example of the Single Responsibility Principle?

๐Ÿ‘‰๐Ÿผ Check all 70 answers



You can also find more Design patterns & System Architecture interview questions here ๐Ÿ‘‰๐Ÿผ https://devinterview.io/design/

software-architecture-interview-questions's People

Contributors

devinterview-io avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.