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 application is built as a collection of small independent services
C. An architecture where the entire application is built as a single, unified unit
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. Centralized deployment of the entire system
D. Loose coupling and high cohesion

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 execute the core business logic of the application
B. To directly manage database schemas
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. Network latency and partial failures
B. Inability to scale
C. Lack of modularity
D. Simplicity of debugging

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

A. The physical network boundary of the cloud provider
B. A logical boundary within which a particular domain model is defined and applicable
C. The limit of database connections allowed
D. The maximum memory limit of a service

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

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

8 What is the 'Database per Service' pattern?

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

9 Which principle suggests that organizations design systems that mirror their communication structures?

A. Moore's Law
B. Conway's Law
C. The CAP Theorem
D. Murphy's Law

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

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

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. Writing code in multiple languages within one file
B. Translating database queries into different languages
C. Using different data storage technologies for different services based on needs
D. Persisting data only in memory

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

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

14 Which mechanism is commonly used for communication between Microservices?

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

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

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

16 When defining Service Boundaries, which approach is recommended?

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

17 What is a 'Sidecar' pattern in microservices?

A. A secondary database
B. A monitoring dashboard
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. CI/CD Pipeline
B. API Gateway
C. Local Logging
D. Microservice Container

19 What is 'Service Discovery'?

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

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

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

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

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

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

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

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

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

24 What is 'Eventual Consistency' in distributed microservices?

A. Data is never consistent
B. Data is always instantly consistent across all nodes
C. Consistency is handled manually by the user
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. Operational complexity
D. Vendor lock-in

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

A. The logging of all faults
B. The ability of the system to stop working when a fault occurs
C. The ability of the system to continue operating properly in the event of the failure of some of its components
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 user locations on a map
C. Creating a sitemap for the application
D. Mapping database tables to UI fields

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

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

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

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

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. Microservices
B. Serverless
C. Event-Driven
D. Monolithic

32 What is a 'Domain Event'?

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

33 Which testing strategy is most complex in Microservices?

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

34 Idempotency in API design means:

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

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

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

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

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

37 What is the relationship between an API Gateway and Cross-Cutting Concerns?

A. API Gateway offloads concerns like auth, logging, and SSL termination from individual services
B. Cross-cutting concerns are handled by the database
C. API Gateway ignores cross-cutting concerns
D. Microservices must handle all cross-cutting concerns individually

38 Which of the following best describes 'Loose Coupling'?

A. Changes in one service do not require changes in other services
B. Services are heavily dependent on each other's internal implementation
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 database password
B. A shared physical server
C. A subset of the domain model shared by two teams/contexts
D. A shared operating system

40 Which format is most commonly used for Microservices configuration?

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

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

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

42 Ideally, a Microservice should be:

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

43 What does 'API Composition' refer to?

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

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

A. Routing HTTP requests
B. Storing source code (like Git)
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. Too many log files
B. Social engineering attacks
C. Increased network latency and reduced performance
D. Database corruption

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

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

47 Domain-Driven Design focuses primarily on:

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

48 Rate Limiting in an API Gateway helps to:

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

49 Who coined the term 'Microservices'?

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

50 Which technology is most closely associated with containerizing Microservices?

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