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

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

3 In 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

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

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

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

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

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

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

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. Binary File Format
B. Best Friends Forever
C. Basic Failover Function
D. Backend for Frontend

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

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

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

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

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

16 When 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

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

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

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

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. Its JSON representation
D. The table name it is stored in

21 Unlike 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

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

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

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

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

25 Which of the following is a disadvantage of Microservices?

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

26 In 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

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

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. 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. 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

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 coding error
B. Something that happened in the domain that the experts care about
C. A scheduled meeting
D. A server restart

33 Which testing strategy is most complex in Microservices?

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

34 Idempotency 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

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. Connecting to multiple databases
D. Spreading related logic across multiple services

36 In 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

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 physical server
B. A shared operating system
C. A subset of the domain model shared by two teams/contexts
D. A shared database password

40 Which format is most commonly used for Microservices configuration?

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

41 The '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

42 Ideally, 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

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

44 In 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

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. 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 infrastructure setup
B. The core business logic and domain complexities
C. The database schema
D. The user interface design

48 Rate 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

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. Apache Tomcat
B. MySQL
C. Docker
D. VirtualBox