1Which of the following best describes a Monolithic Architecture?
A.An architecture that distributes data across peer-to-peer networks
B.An architecture where the entire application is built as a single, unified unit
C.An architecture where the application is built as a collection of small independent services
D.An architecture relying solely on serverless functions
Correct Answer: An architecture where the entire application is built as a single, unified unit
Explanation:
A monolithic architecture integrates all components (UI, business logic, data access) into a single deployable unit.
Incorrect! Try again.
2What is a primary characteristic of Microservices Architecture?
A.Single shared database for all modules
B.Tightly coupled components
C.Loose coupling and high cohesion
D.Centralized deployment of the entire system
Correct Answer: Loose coupling and high cohesion
Explanation:
Microservices are designed to be loosely coupled so they can be updated independently, while maintaining high cohesion within their specific business domain.
Incorrect! Try again.
3In the context of Domain-Driven Design (DDD), what is 'Ubiquitous Language'?
A.A translation layer between different microservices
B.A common language shared by developers and domain experts to describe the system
C.The standardized API documentation language
D.A programming language like Java or Python
Correct Answer: A common language shared by developers and domain experts to describe the system
Explanation:
Ubiquitous Language is a DDD principle ensuring that technical and business teams use the same terminology to avoid ambiguity.
Incorrect! Try again.
4What is the primary role of an API Gateway in a microservices architecture?
A.To execute the core business logic of the application
B.To store all application data
C.To act as a single entry point for all client requests
D.To directly manage database schemas
Correct Answer: To act as a single entry point for all client requests
Explanation:
An API Gateway accepts incoming traffic from clients and routes it to the appropriate microservices, often handling cross-cutting concerns.
Incorrect! Try again.
5Which of the following is a significant challenge in Distributed Architectures compared to Monoliths?
A.Inability to scale
B.Simplicity of debugging
C.Network latency and partial failures
D.Lack of modularity
Correct Answer: Network latency and partial failures
Explanation:
Distributed systems introduce complexity regarding network communication, latency, and the risk that one part of the system may fail while others remain active.
Incorrect! Try again.
6In DDD, what is a 'Bounded Context'?
A.The limit of database connections allowed
B.A logical boundary within which a particular domain model is defined and applicable
C.The physical network boundary of the cloud provider
D.The maximum memory limit of a service
Correct Answer: A logical boundary within which a particular domain model is defined and applicable
Explanation:
Bounded Context defines the limits of a specific subsystem or microservice, ensuring terms and models have a specific meaning only within that boundary.
Incorrect! Try again.
7How does scaling typically differ between Monolithic and Microservices architectures?
In a monolith, if one module needs more resources, the whole app must be replicated. Microservices allow scaling only the specific service experiencing high load.
Incorrect! Try again.
8What is the 'Database per Service' pattern?
A.Databases are forbidden in microservices
B.Services connect to a database based on the user's location
C.Each microservice manages its own database data exclusively
D.All services share a single massive database
Correct Answer: Each microservice manages its own database data exclusively
Explanation:
To ensure loose coupling, microservices usually own their data store, preventing other services from bypassing the API to access data directly.
Incorrect! Try again.
9Which principle suggests that organizations design systems that mirror their communication structures?
A.Murphy's Law
B.Conway's Law
C.Moore's Law
D.The CAP Theorem
Correct Answer: Conway's Law
Explanation:
Conway's Law states that systems defined by organizations are constrained to produce designs that are copies of the communication structures of these organizations.
Incorrect! Try again.
10What is a 'BFF' in the context of API Gateways?
A.Binary File Format
B.Best Friends Forever
C.Basic Failover Function
D.Backend for Frontend
Correct Answer: Backend for Frontend
Explanation:
Backend for Frontend (BFF) is a variation of the API Gateway pattern where separate gateways are created for different client types (e.g., Mobile, Web).
Incorrect! Try again.
11Which of the following is an advantage of Monolithic architecture over Microservices?
A.Simpler to test and debug initially
B.Easier to implement continuous deployment
C.Independent scaling of components
D.Better fault isolation
Correct Answer: Simpler to test and debug initially
Explanation:
Monoliths are easier to test and debug initially because all code is in one place, and there is no need to trace requests across a network of services.
Incorrect! Try again.
12What is 'Polyglot Persistence'?
A.Using different data storage technologies for different services based on needs
B.Translating database queries into different languages
C.Persisting data only in memory
D.Writing code in multiple languages within one file
Correct Answer: Using different data storage technologies for different services based on needs
Explanation:
Microservices allow teams to choose the best database (SQL, NoSQL, Graph, etc.) for the specific problem a service is solving.
Incorrect! Try again.
13What is an 'Aggregate' in Domain-Driven Design?
A.The total sum of all data transactions
B.A collection of all microservices
C.A cluster of domain objects that can be treated as a single unit
D.A backup of the database
Correct Answer: A cluster of domain objects that can be treated as a single unit
Explanation:
An Aggregate is a pattern in DDD where a cluster of entities and value objects are treated as a single unit for data changes, controlled by an Aggregate Root.
Incorrect! Try again.
14Which mechanism is commonly used for communication between Microservices?
A.Direct Database Links
B.Shared Memory
C.Lightweight protocols like HTTP/REST or gRPC
D.Global Variables
Correct Answer: Lightweight protocols like HTTP/REST or gRPC
Explanation:
Microservices communicate over a network using lightweight, technology-agnostic protocols like HTTP (REST) or gRPC.
Incorrect! Try again.
15What is the function of the 'Anti-Corruption Layer' in DDD?
A.To prevent viruses
B.To translate between two different domain models to prevent concepts from one leaking into the other
C.To clean up unused code
D.To encrypt database traffic
Correct Answer: To translate between two different domain models to prevent concepts from one leaking into the other
Explanation:
An Anti-Corruption Layer is used when a new system needs to communicate with a legacy system, translating the legacy model into the new model to maintain integrity.
Incorrect! Try again.
16When defining Service Boundaries, which approach is recommended?
A.Decomposition by hardware availability
B.Decomposition by Business Capability
C.Decomposition by codebase size
D.Decomposition by alphabetical order
Correct Answer: Decomposition by Business Capability
Explanation:
Services should be defined around business capabilities (e.g., Shipping, Billing) rather than technical layers or arbitrary metrics.
Incorrect! Try again.
17What is a 'Sidecar' pattern in microservices?
A.A backup server
B.A monitoring dashboard
C.A helper component that runs alongside the main service container
D.A secondary database
Correct Answer: A helper component that runs alongside the main service container
Explanation:
The Sidecar pattern involves deploying a helper service (handling logging, proxying, etc.) alongside the main application container.
Incorrect! Try again.
18Which of the following creates a 'Single Point of Failure' if not properly managed?
A.API Gateway
B.Local Logging
C.CI/CD Pipeline
D.Microservice Container
Correct Answer: API Gateway
Explanation:
Since all traffic flows through the API Gateway, if it goes down, the entire application becomes inaccessible unless the gateway is clustered/redundant.
Incorrect! Try again.
19What is 'Service Discovery'?
A.A marketing tool for services
B.A security scan for vulnerabilities
C.A method to discover new business opportunities
D.A mechanism for services to find the network locations of other services
Correct Answer: A mechanism for services to find the network locations of other services
Explanation:
In dynamic cloud environments, service instances change IP addresses frequently; Service Discovery allows them to locate each other dynamically.
Incorrect! Try again.
20In DDD, what defines the identity of an 'Entity'?
A.Its attributes and properties
B.A unique identifier (ID) that persists over time
C.Its JSON representation
D.The table name it is stored in
Correct Answer: A unique identifier (ID) that persists over time
Explanation:
Entities are domain objects defined by their continuity and identity (e.g., a User ID), not just by their attributes.
Incorrect! Try again.
21Unlike Entities, 'Value Objects' in DDD are defined by:
A.Their attributes and immutability
B.Their creation date
C.Their unique ID
D.Their relationship to the database
Correct Answer: Their attributes and immutability
Explanation:
Value Objects (e.g., a Currency or Coordinate) do not have a unique identity; they are defined by their values and are typically immutable.
Incorrect! Try again.
22What is the 'Strangler Fig' pattern used for?
A.Securing API keys
B.Compressing data traffic
C.Strangling process threads that hang
D.Migrating a Monolithic application to Microservices gradually
Correct Answer: Migrating a Monolithic application to Microservices gradually
Explanation:
The Strangler Fig pattern involves gradually replacing specific functionalities of a monolith with new microservices until the monolith is shut down.
Incorrect! Try again.
23Which feature is NOT typically handled by an API Gateway?
A.Request Routing
B.Rate Limiting
C.Business Logic implementation
D.Protocol Translation
Correct Answer: Business Logic implementation
Explanation:
An API Gateway handles cross-cutting concerns (routing, auth, throttling). Placing core business logic in the gateway is an anti-pattern.
Incorrect! Try again.
24What is 'Eventual Consistency' in distributed microservices?
A.Data is never consistent
B.The system guarantees that if no new updates are made, eventually all accesses will return the last updated value
C.Data is always instantly consistent across all nodes
D.Consistency is handled manually by the user
Correct Answer: The system guarantees that if no new updates are made, eventually all accesses will return the last updated value
Explanation:
In distributed systems, immediate consistency is hard to achieve without sacrificing availability; eventual consistency allows temporary inconsistencies.
Incorrect! Try again.
25Which of the following is a disadvantage of Microservices?
A.Slower development speed for small teams initially
26In a distributed architecture, what is 'Fault Tolerance'?
A.The logging of all faults
B.The prevention of all bugs
C.The ability of the system to continue operating properly in the event of the failure of some of its components
D.The ability of the system to stop working when a fault occurs
Correct Answer: The ability of the system to continue operating properly in the event of the failure of some of its components
Explanation:
Fault tolerance ensures that the failure of a single service does not crash the entire distributed application.
Incorrect! Try again.
27What is 'Context Mapping' in DDD?
A.Mapping user locations on a map
B.Identifying the relationships and integration patterns between different Bounded Contexts
C.Mapping database tables to UI fields
D.Creating a sitemap for the application
Correct Answer: Identifying the relationships and integration patterns between different Bounded Contexts
Explanation:
Context Mapping visualizes how different Bounded Contexts interact and integrate (e.g., Shared Kernel, Customer/Supplier).
Incorrect! Try again.
28Which is a common method to prevent 'Cascading Failures' in microservices?
A.Circuit Breaker Pattern
B.Infinite Loops
C.Tight Coupling
D.Monolithic Databases
Correct Answer: Circuit Breaker Pattern
Explanation:
The Circuit Breaker pattern detects failures and prevents the application from trying to perform an action that is doomed to fail, protecting the system.
Incorrect! Try again.
29The term 'Smart Endpoints and Dumb Pipes' refers to:
A.Putting logic in the message bus/ESB
B.Using AI in network cables
C.Using dumb terminals
D.Putting logic in the services and using the network only for transport
Correct Answer: Putting logic in the services and using the network only for transport
Explanation:
Microservices prefer keeping intelligence (business logic) within the services (endpoints) rather than in the communication mechanism (pipes/ESBs).
Incorrect! Try again.
30What is 'Request Aggregation' in an API Gateway?
A.Deleting duplicate requests
B.Blocking all requests
C.Gathering data from multiple services to return a single response to the client
D.Gathering multiple requests from a client into a single request to the backend
Correct Answer: Gathering data from multiple services to return a single response to the client
Explanation:
Request Aggregation allows the gateway to call multiple backend services and combine the results, reducing the number of round-trips the client must make.
Incorrect! Try again.
31Which architecture is known for 'Spaghetti Code' if not managed well?
A.Event-Driven
B.Serverless
C.Monolithic
D.Microservices
Correct Answer: Monolithic
Explanation:
Monoliths often degrade into 'Big Balls of Mud' or spaghetti code where dependencies are tangled, making maintenance difficult.
Incorrect! Try again.
32What is a 'Domain Event'?
A.A coding error
B.Something that happened in the domain that the experts care about
C.A scheduled meeting
D.A server restart
Correct Answer: Something that happened in the domain that the experts care about
Explanation:
Domain Events capture significant occurrences within the business domain (e.g., 'OrderPlaced', 'PaymentFailed').
Incorrect! Try again.
33Which testing strategy is most complex in Microservices?
A.Manual Testing
B.End-to-End (Integration) Testing
C.Unit Testing
D.Static Analysis
Correct Answer: End-to-End (Integration) Testing
Explanation:
Testing a flow that spans multiple independent services is difficult due to the need to coordinate states and environments across distributed systems.
Incorrect! Try again.
34Idempotency in API design means:
A.The API is fast
B.An API call is only allowed once
C.An API call can be made multiple times without changing the result beyond the initial application
D.The API is secure
Correct Answer: An API call can be made multiple times without changing the result beyond the initial application
Explanation:
Idempotency ensures that retrying a request (e.g., due to network failure) does not cause unintended side effects (like charging a card twice).
Incorrect! Try again.
35What helps ensure 'High Cohesion' in a microservice?
A.Grouping unrelated functions together
B.Ensuring the service does one thing and does it well
C.Connecting to multiple databases
D.Spreading related logic across multiple services
Correct Answer: Ensuring the service does one thing and does it well
Explanation:
High cohesion means that the elements within a module/service belong together and are focused on a single responsibility.
Incorrect! Try again.
36In the context of service boundaries, what is 'Decomposition by Subdomain'?
A.Dividing services by file size
B.Splitting services based on URL subdomains
C.Defining services corresponding to Domain-Driven Design (DDD) subdomains
D.Splitting services by developer teams
Correct Answer: Defining services corresponding to Domain-Driven Design (DDD) subdomains
Explanation:
This strategy uses DDD concepts to identify Core, Supporting, and Generic subdomains and maps services to them.
Incorrect! Try again.
37What is the relationship between an API Gateway and Cross-Cutting Concerns?
A.API Gateway ignores cross-cutting concerns
B.API Gateway offloads concerns like auth, logging, and SSL termination from individual services
C.Microservices must handle all cross-cutting concerns individually
D.Cross-cutting concerns are handled by the database
Correct Answer: API Gateway offloads concerns like auth, logging, and SSL termination from individual services
Explanation:
Centralizing things like authentication and SSL in the Gateway simplifies the individual microservices.
Incorrect! Try again.
38Which of the following best describes 'Loose Coupling'?
A.Services are heavily dependent on each other's internal implementation
B.Changes in one service do not require changes in other services
C.Services share the same memory space
D.Services must differ in programming languages
Correct Answer: Changes in one service do not require changes in other services
Explanation:
Loose coupling ensures that services interact via defined interfaces, so internal changes in one do not break others.
Incorrect! Try again.
39What is a 'Shared Kernel' in DDD Context Mapping?
A.A shared physical server
B.A shared operating system
C.A subset of the domain model shared by two teams/contexts
D.A shared database password
Correct Answer: A subset of the domain model shared by two teams/contexts
Explanation:
Shared Kernel is a pattern where two bounded contexts share a common part of the model/code, requiring close coordination.
Incorrect! Try again.
40Which format is most commonly used for Microservices configuration?
A.HTML
B.C++ Header files
C.Binary code
D.YAML or JSON
Correct Answer: YAML or JSON
Explanation:
Configuration (like Kubernetes manifests or Docker Compose) is typically human-readable YAML or JSON.
Incorrect! Try again.
41The 'Two-Phase Commit' (2PC) protocol is often avoided in Microservices because:
A.It creates tight coupling and reduces availability (blocking)
B.It is too fast
C.It is only for Monoliths
D.It is not secure
Correct Answer: It creates tight coupling and reduces availability (blocking)
Explanation:
Distributed transactions like 2PC lock resources across services, hurting performance and availability. Sagas are preferred.
Incorrect! Try again.
42Ideally, a Microservice should be:
A.Dependent on a central orchestrator
B.Large and comprehensive
C.Independently deployable
D.Written in the same language as all other services
Correct Answer: Independently deployable
Explanation:
The core value of microservices is the ability to deploy changes to one service without redeploying the whole system.
Incorrect! Try again.
43What does 'API Composition' refer to?
A.Compiling API code
B.Querying data from several services and combining it in memory
C.Encrypting APIs
D.Writing documentation for APIs
Correct Answer: Querying data from several services and combining it in memory
Explanation:
API Composition is a pattern (often in the Gateway) to retrieve data from multiple services to build a view.
Incorrect! Try again.
44In DDD, a 'Repository' is responsible for:
A.Storing source code (like Git)
B.Routing HTTP requests
C.Managing user sessions
D.Encapsulating the logic to access data sources and returning domain objects
Correct Answer: Encapsulating the logic to access data sources and returning domain objects
Explanation:
Repositories provide a collection-like interface for accessing domain objects, hiding the details of the underlying database.
Incorrect! Try again.
45What is the risk of 'Chatty' communication between microservices?
A.Increased network latency and reduced performance
B.Social engineering attacks
C.Too many log files
D.Database corruption
Correct Answer: Increased network latency and reduced performance
Explanation:
If services call each other too frequently (chatty), the network overhead accumulates, slowing down the application.
Incorrect! Try again.
46Which of the following is a symptom of a 'Distributed Monolith'?
A.Services are independently deployable
B.Services share high cohesion
C.Services must be deployed together in a specific order
D.Each service has its own database
Correct Answer: Services must be deployed together in a specific order
Explanation:
If microservices are so tightly coupled that they cannot be deployed independently, the system loses the benefits of microservices and becomes a distributed monolith.
Incorrect! Try again.
47Domain-Driven Design focuses primarily on:
A.The infrastructure setup
B.The core business logic and domain complexities
C.The database schema
D.The user interface design
Correct Answer: The core business logic and domain complexities
Explanation:
DDD emphasizes tackling complexity in the heart of the software (the business domain) rather than technology first.
Incorrect! Try again.
48Rate Limiting in an API Gateway helps to:
A.Reduce the cost of software licenses
B.Increase the speed of the internet
C.Limit the number of developers on a project
D.Protect services from being overwhelmed by too many requests
Correct Answer: Protect services from being overwhelmed by too many requests
Explanation:
Rate limiting restricts the number of requests a client can make in a given timeframe to prevent abuse or overload.
Incorrect! Try again.
49Who coined the term 'Microservices'?
A.Bill Gates
B.Dr. Peter Rogers (or popularized by Martin Fowler/James Lewis)
C.Steve Jobs
D.Linus Torvalds
Correct Answer: Dr. Peter Rogers (or popularized by Martin Fowler/James Lewis)
Explanation:
While the concept evolved, the term was popularized by Martin Fowler and James Lewis, and originated from ideas discussed by Dr. Peter Rogers.
Incorrect! Try again.
50Which technology is most closely associated with containerizing Microservices?
A.Apache Tomcat
B.MySQL
C.Docker
D.VirtualBox
Correct Answer: Docker
Explanation:
Docker is the standard platform for creating containers, which are lightweight execution environments perfect for microservices.