Unit 2 - Practice Quiz

INT363

1 Which of the following best describes a Monolithic Architecture?

A. An architecture where the application is built as a collection of small independent services
B. An architecture where the entire application is built as a single, unified unit
C. An architecture relying solely on serverless functions
D. An architecture that distributes data across peer-to-peer networks

2 What is a primary characteristic of Microservices Architecture?

A. Tightly coupled components
B. Single shared database for all modules
C. Loose coupling and high cohesion
D. Centralized deployment of the entire system

3 In the context of Domain-Driven Design (DDD), what is 'Ubiquitous Language'?

A. A programming language like Java or Python
B. A common language shared by developers and domain experts to describe the system
C. The standardized API documentation language
D. A translation layer between different microservices

4 What is the primary role of an API Gateway in a microservices architecture?

A. To store all application data
B. To act as a single entry point for all client requests
C. To execute the core business logic of the application
D. To directly manage database schemas

5 Which of the following is a significant challenge in Distributed Architectures compared to Monoliths?

A. Lack of modularity
B. Inability to scale
C. Network latency and partial failures
D. Simplicity of debugging

6 In DDD, what is a 'Bounded Context'?

A. The maximum memory limit of a service
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 limit of database connections allowed

7 How does scaling typically differ between Monolithic and Microservices architectures?

A. Monoliths scale horizontally by function; Microservices scale vertically
B. Monoliths require scaling the entire application; Microservices allow scaling individual services
C. There is no difference in scaling strategies
D. Microservices cannot be scaled horizontally

8 What is the 'Database per Service' pattern?

A. All services share a single massive database
B. Each microservice manages its own database data exclusively
C. Services connect to a database based on the user's location
D. Databases are forbidden in microservices

9 Which 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

10 What is a 'BFF' in the context of API Gateways?

A. Best Friends Forever
B. Backend for Frontend
C. Binary File Format
D. Basic Failover Function

11 Which of the following is an advantage of Monolithic architecture over Microservices?

A. Easier to implement continuous deployment
B. Simpler to test and debug initially
C. Better fault isolation
D. Independent scaling of components

12 What is 'Polyglot Persistence'?

A. Writing code in multiple languages within one file
B. Using different data storage technologies for different services based on needs
C. Persisting data only in memory
D. Translating database queries into different languages

13 What is an 'Aggregate' in Domain-Driven Design?

A. A collection of all microservices
B. A cluster of domain objects that can be treated as a single unit
C. The total sum of all data transactions
D. A backup of the database

14 Which mechanism is commonly used for communication between Microservices?

A. Shared Memory
B. Direct Database Links
C. Lightweight protocols like HTTP/REST or gRPC
D. Global Variables

15 What 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 encrypt database traffic
D. To clean up unused code

16 When defining Service Boundaries, which approach is recommended?

A. Decomposition by codebase size
B. Decomposition by Business Capability
C. Decomposition by alphabetical order
D. Decomposition by hardware availability

17 What is a 'Sidecar' pattern in microservices?

A. A secondary database
B. A helper component that runs alongside the main service container
C. A backup server
D. A monitoring dashboard

18 Which of the following creates a 'Single Point of Failure' if not properly managed?

A. Microservice Container
B. API Gateway
C. Local Logging
D. CI/CD Pipeline

19 What is 'Service Discovery'?

A. A marketing tool for services
B. A mechanism for services to find the network locations of other services
C. A method to discover new business opportunities
D. A security scan for vulnerabilities

20 In DDD, what defines the identity of an 'Entity'?

A. Its attributes and properties
B. A unique identifier (ID) that persists over time
C. The table name it is stored in
D. Its JSON representation

21 Unlike Entities, 'Value Objects' in DDD are defined by:

A. Their unique ID
B. Their attributes and immutability
C. Their relationship to the database
D. Their creation date

22 What is the 'Strangler Fig' pattern used for?

A. Compressing data traffic
B. Migrating a Monolithic application to Microservices gradually
C. Strangling process threads that hang
D. Securing API keys

23 Which feature is NOT typically handled by an API Gateway?

A. Request Routing
B. Protocol Translation
C. Business Logic implementation
D. Rate Limiting

24 What is 'Eventual Consistency' in distributed microservices?

A. Data is always instantly consistent across all nodes
B. The system guarantees that if no new updates are made, eventually all accesses will return the last updated value
C. Data is never consistent
D. Consistency is handled manually by the user

25 Which of the following is a disadvantage of Microservices?

A. Vendor lock-in
B. Operational complexity
C. Inability to use different technologies
D. Slower development speed for small teams initially

26 In a distributed architecture, what is 'Fault Tolerance'?

A. The ability of the system to stop working when a fault occurs
B. The ability of the system to continue operating properly in the event of the failure of some of its components
C. The logging of all faults
D. The prevention of all bugs

27 What is 'Context Mapping' in DDD?

A. Mapping database tables to UI fields
B. Identifying the relationships and integration patterns between different Bounded Contexts
C. Mapping user locations on a map
D. Creating a sitemap for the application

28 Which is a common method to prevent 'Cascading Failures' in microservices?

A. Circuit Breaker Pattern
B. Infinite Loops
C. Tight Coupling
D. Monolithic Databases

29 The term 'Smart Endpoints and Dumb Pipes' refers to:

A. Putting logic in the message bus/ESB
B. Putting logic in the services and using the network only for transport
C. Using AI in network cables
D. Using dumb terminals

30 What is 'Request Aggregation' in an API Gateway?

A. Blocking all requests
B. Gathering multiple requests from a client into a single request to the backend
C. Gathering data from multiple services to return a single response to the client
D. Deleting duplicate requests

31 Which architecture is known for 'Spaghetti Code' if not managed well?

A. Microservices
B. Monolithic
C. Serverless
D. Event-Driven

32 What is a 'Domain Event'?

A. A server restart
B. Something that happened in the domain that the experts care about
C. A coding error
D. A scheduled meeting

33 Which testing strategy is most complex in Microservices?

A. Unit Testing
B. End-to-End (Integration) Testing
C. Manual Testing
D. Static Analysis

34 Idempotency in API design means:

A. An API call can be made multiple times without changing the result beyond the initial application
B. An API call is only allowed once
C. The API is secure
D. The API is fast

35 What helps ensure 'High Cohesion' in a microservice?

A. Grouping unrelated functions together
B. Ensuring the service does one thing and does it well
C. Spreading related logic across multiple services
D. Connecting to multiple databases

36 In the context of service boundaries, what is 'Decomposition by Subdomain'?

A. Splitting services based on URL subdomains
B. Defining services corresponding to Domain-Driven Design (DDD) subdomains
C. Splitting services by developer teams
D. Dividing services by file size

37 What 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

38 Which 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

39 What is a 'Shared Kernel' in DDD Context Mapping?

A. A shared operating system
B. A subset of the domain model shared by two teams/contexts
C. A shared database password
D. A shared physical server

40 Which format is most commonly used for Microservices configuration?

A. Binary code
B. YAML or JSON
C. HTML
D. C++ Header files

41 The 'Two-Phase Commit' (2PC) protocol is often avoided in Microservices because:

A. It is too fast
B. It creates tight coupling and reduces availability (blocking)
C. It is only for Monoliths
D. It is not secure

42 Ideally, a Microservice should be:

A. Large and comprehensive
B. Independently deployable
C. Dependent on a central orchestrator
D. Written in the same language as all other services

43 What does 'API Composition' refer to?

A. Writing documentation for APIs
B. Querying data from several services and combining it in memory
C. Compiling API code
D. Encrypting APIs

44 In DDD, a 'Repository' is responsible for:

A. Storing source code (like Git)
B. Encapsulating the logic to access data sources and returning domain objects
C. Routing HTTP requests
D. Managing user sessions

45 What is the risk of 'Chatty' communication between microservices?

A. Too many log files
B. Increased network latency and reduced performance
C. Social engineering attacks
D. Database corruption

46 Which 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

47 Domain-Driven Design focuses primarily on:

A. The database schema
B. The core business logic and domain complexities
C. The user interface design
D. The infrastructure setup

48 Rate Limiting in an API Gateway helps to:

A. Increase the speed of the internet
B. Protect services from being overwhelmed by too many requests
C. Limit the number of developers on a project
D. Reduce the cost of software licenses

49 Who coined the term 'Microservices'?

A. Bill Gates
B. Dr. Peter Rogers (or popularized by Martin Fowler/James Lewis)
C. Steve Jobs
D. Linus Torvalds

50 Which technology is most closely associated with containerizing Microservices?

A. VirtualBox
B. Docker
C. Apache Tomcat
D. MySQL