Unit 2 - Practice Quiz

INT363 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 Which of the following best describes a Monolithic Architecture?

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

2 What is a primary characteristic of Microservices Architecture?

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

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

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

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

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

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

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

6 In 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 maximum memory limit of a service
D. The physical network boundary of the cloud provider

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

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

8 What is the 'Database per Service' pattern?

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

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. Better fault isolation
C. Simpler to test and debug initially
D. Independent scaling of components

12 What is 'Polyglot Persistence'?

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

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

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

14 Which mechanism is commonly used for communication between Microservices?

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

15 What is the function of the 'Anti-Corruption Layer' in DDD?

A. To translate between two different domain models to prevent concepts from one leaking into the other
B. To clean up unused code
C. To prevent viruses
D. To encrypt database traffic

16 When defining Service Boundaries, which approach is recommended?

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

17 What is a 'Sidecar' pattern in microservices?

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

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

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

19 What is 'Service Discovery'?

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

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

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

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

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

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

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

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

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

24 What is 'Eventual Consistency' in distributed microservices?

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

25 Which of the following is a disadvantage of Microservices?

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

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

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

27 What is 'Context Mapping' in DDD?

A. Identifying the relationships and integration patterns between different Bounded Contexts
B. Mapping database tables to UI fields
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. Infinite Loops
B. Monolithic Databases
C. Circuit Breaker Pattern
D. Tight Coupling

29 The 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

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

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

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

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

32 What is a 'Domain Event'?

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

33 Which testing strategy is most complex in Microservices?

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

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. Spreading related logic across multiple services
B. Connecting to multiple databases
C. Ensuring the service does one thing and does it well
D. Grouping unrelated functions together

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

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

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 share the same memory space
B. Changes in one service do not require changes in other services
C. Services are heavily dependent on each other's internal implementation
D. Services must differ in programming languages

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

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

40 Which format is most commonly used for Microservices configuration?

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

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

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

42 Ideally, a Microservice should be:

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

43 What does 'API Composition' refer to?

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

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

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

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

46 Which of the following is a symptom of a 'Distributed Monolith'?

A. Each service has its own database
B. Services must be deployed together in a specific order
C. Services share high cohesion
D. Services are independently deployable

47 Domain-Driven Design focuses primarily on:

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

48 Rate Limiting in an API Gateway helps to:

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

49 Who coined the term 'Microservices'?

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

50 Which technology is most closely associated with containerizing Microservices?

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