Unit 5: Cloud-Native Development - Practice Quiz

INT363 — Cloud Microservices 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the main goal of cloud-native architecture?

Cloud-native architecture Easy
A. To build scalable and resilient cloud applications
B. To avoid using automated deployment tools
C. To run applications only on local servers
D. To store all data in a single file

2 Which technology commonly packages a cloud-native application with its dependencies?

Cloud-native architecture Easy
A. Virtual spreadsheet
B. Text editor
C. Network switch
D. Software container

3 What does it mean for microservices to be loosely coupled?

Loosely coupled services Easy
A. Every service must use the same programming language
B. Each service must run on the same server
C. Each service can change with minimal impact on others
D. All services must share the same source code

4 How do loosely coupled services commonly communicate?

Loosely coupled services Easy
A. Through direct memory access
B. Through hardware keyboard signals
C. Through well-defined APIs
D. Through shared screen displays

5 What is the purpose of service discovery in a microservices system?

Service Discovery Easy
A. To compress application source code
B. To design graphical user interfaces
C. To locate available service instances
D. To create database table columns

6 Where are service locations commonly recorded for service discovery?

Service Discovery Easy
A. In a source compiler
B. In a service registry
C. In a user profile
D. In a browser cache

7 What does a load balancer do?

Load Balancing Easy
A. Encrypts every database record
B. Distributes requests across service instances
C. Combines all services into one process
D. Writes all application source code

8 Why does a load balancer perform health checks?

Load Balancing Easy
A. To rename application databases
B. To measure the size of source files
C. To identify unavailable service instances
D. To create new user passwords

9 What is autoscaling?

Autoscaling Easy
A. Copying data into a single local file
B. Permanently disabling unused network connections
C. Manually rewriting code after each request
D. Automatically changing resources based on demand

10 Which metric is commonly used to trigger autoscaling?

Autoscaling Easy
A. CPU utilization
B. File name length
C. Screen brightness
D. Keyboard layout

11 Which data management pattern is common in microservices?

Data Management Easy
A. A browser cookie for all business data
B. A single variable for every data item
C. A shared text file for every service
D. A separate database for each service

12 What does eventual consistency mean in a distributed system?

Data Management Easy
A. Every update is immediately visible everywhere
B. All data is deleted after each transaction
C. Only one service is allowed to store data
D. Data may differ briefly but later becomes consistent

13 According to the twelve-factor app methodology, where should deployment-specific configuration be stored?

The twelve-factor app methodology Easy
A. Inside compiled application binaries
B. In hard-coded source values
C. In environment variables
D. Inside user interface images

14 What does the twelve-factor methodology recommend for application dependencies?

The twelve-factor app methodology Easy
A. Download them manually after startup
B. Share them without recording versions
C. Declare and isolate them explicitly
D. Hide them inside operating system folders

15 How should twelve-factor application processes generally operate?

The twelve-factor app methodology Easy
A. As stateless processes
B. As permanent database locks
C. As shared memory segments
D. As stateful desktop programs

16 Who manages the underlying servers in a serverless architecture?

Serverless architectures Easy
A. The network visitor
B. The application user
C. The database customer
D. The cloud provider

17 What commonly causes a serverless function to execute?

Serverless architectures Easy
A. A source file rename
B. A monitor resolution change
C. An event or request
D. A keyboard replacement

18 Why does Netflix use microservices in its streaming platform?

Case studies on Netflix, Amazon, Uber, etc. Easy
A. To remove the need for networking
B. To support scalability and service independence
C. To require one deployment for all changes
D. To keep every feature in one process

19 What organizational benefit is associated with Amazon's use of small, service-focused teams?

Case studies on Netflix, Amazon, Uber, etc. Easy
A. Teams avoid using service interfaces
B. Teams place all code in one component
C. Teams must share one deployment schedule
D. Teams can own and develop services independently

20 Why did Uber adopt microservices as its platform grew?

Case studies on Netflix, Amazon, Uber, etc. Easy
A. To eliminate all cloud infrastructure
B. To place every feature in one database procedure
C. To support growth with independently scalable services
D. To prevent services from communicating through APIs

21 An online retailer wants each product team to deploy its service independently without coordinating every release. Which architectural decision best supports this goal?

Cloud-native architecture Medium
A. Give each service a clear business capability and deployment pipeline
B. Route all service requests through a single application process
C. Place all services in one repository and release them together
D. Require every service to use a shared internal object model

22 A payment service publishes a PaymentCompleted event without knowing which services will consume it. What is the main architectural benefit?

Loosely coupled services Medium
A. Consumers always process events in the same global order
B. The producer can directly control every consumer transaction
C. The producer and consumers share one deployment lifecycle
D. Consumers can evolve without direct dependencies on the producer

23 Service instances receive dynamic IP addresses and may be replaced frequently. How should an API gateway locate healthy instances?

Service Discovery Medium
A. Query a service registry containing current instance locations
B. Store one permanent instance address in a DNS cache
C. Read static IP addresses from the application source code
D. Broadcast each request to every node in the cluster

24 Four service instances have active connection counts of 12, 7, 19, and 4. Which instance would a least-connections load balancer select for the next request?

Load Balancing Medium
A. The instance with 12 connections
B. The instance with 4 connections
C. The instance with 7 connections
D. The instance with 19 connections

25 A worker service processes messages from a queue. CPU usage stays low even when thousands of messages are waiting. Which scaling metric is most appropriate?

Autoscaling Medium
A. The number of configured API routes
B. The count of source-code repositories
C. The amount of allocated disk storage
D. The number and age of queued messages

26 An order workflow updates the order, payment, and inventory services, each with its own database. Which approach best handles a failure after payment succeeds but inventory reservation fails?

Data Management Medium
A. Lock all databases through a shared application connection
B. Repeat every operation until all databases become identical
C. Use one foreign key across all three service databases
D. Use a saga that invokes a payment compensation action

27 A service uses different database URLs in development, testing, and production. According to the twelve-factor methodology, where should these values be stored?

The twelve-factor app methodology Medium
A. In a shared document copied manually during every deployment
B. In separate branches containing modified application source files
C. In environment-based configuration outside the application code
D. In constants compiled into each environment's executable file

28 A containerized service writes logs to local files, but those logs disappear whenever the container is replaced. Which change best follows twelve-factor guidance?

The twelve-factor app methodology Medium
A. Disable replacement of containers that contain log files
B. Send logs to another thread in the same process
C. Write logs as event streams to standard output
D. Store logs permanently in the container image

29 A serverless function may receive the same payment event more than once because the platform retries failed deliveries. Which design most effectively prevents duplicate charges?

Serverless architectures Medium
A. Disable application logging during payment processing
B. Use an idempotency key for each payment operation
C. Increase the function's memory for every invocation
D. Create a new database table for each invocation

30 Users experience high latency on the first request after a serverless function has been idle. Which measure most directly reduces this cold-start impact?

Serverless architectures Medium
A. Configure provisioned concurrency for expected baseline traffic
B. Replace asynchronous events with synchronous database triggers
C. Store larger response objects in the function deployment package
D. Increase the event retention period in the message broker

31 A video platform wants playback recommendations to remain available even when the personalization service is failing. Which pattern associated with Netflix-style resilience best addresses this requirement?

Case studies on Netflix, Amazon, Uber, etc. Medium
A. Place playback and personalization in one database transaction
B. Retry each failed request forever without a delay
C. Use a circuit breaker and return cached recommendations
D. Stop all user requests until personalization fully recovers

32 A large e-commerce company wants teams to own services from development through production. Which practice most closely matches Amazon's service-oriented operating model?

Case studies on Netflix, Amazon, Uber, etc. Medium
A. Quarterly releases combine every service into one deployment
B. One central team deploys and operates every business service
C. Small teams own services and their operational outcomes
D. All teams modify a shared database through common tables

33 A ride-sharing platform must continuously match drivers with nearby riders as locations change. Which architecture is most suitable for this Uber-like workload?

Case studies on Netflix, Amazon, Uber, etc. Medium
A. A nightly batch job using one global spreadsheet
B. A monthly data export processed by desktop applications
C. A static website backed by a single read-only database
D. Event streams combined with geospatially partitioned services

34 A product catalog service becomes unavailable, but the storefront should continue showing recently viewed products. Which cloud-native design principle best supports this behavior?

Cloud-native architecture Medium
A. Shared-memory communication between all service instances
B. Strong coupling through synchronous calls for every page
C. Coordinated shutdown of every dependent application service
D. Graceful degradation using cached or reduced functionality

35 A customer service must add a field to its response without immediately breaking existing consumers. Which API change best preserves loose coupling?

Loosely coupled services Medium
A. Rename all existing fields and require immediate consumer updates
B. Remove older fields as soon as the new field is introduced
C. Add an optional field while preserving existing response fields
D. Change the response format without publishing a new contract

36 A terminated service instance remains listed in the registry and continues receiving requests. Which mechanism would most directly reduce this problem?

Service Discovery Medium
A. Health checks with lease expiration and deregistration
B. Static host entries distributed during application builds
C. Random port changes performed without registry updates
D. Long-lived client caches without endpoint refreshes

37 A web application stores user sessions only in each server's local memory. Users lose their sessions when requests reach different instances. What is the most scalable correction?

Load Balancing Medium
A. Copy all sessions manually whenever an instance is added
B. Reduce the deployment to one large application instance
C. Send every user permanently to the first available server
D. Store session state in a shared external data service

38 A service repeatedly scales out and then scales in within a few minutes because its CPU utilization fluctuates near the target threshold. Which configuration change best limits this oscillation?

Autoscaling Medium
A. Remove all minimum and maximum instance limits
B. Add stabilization windows and separate scaling thresholds
C. Replace CPU monitoring with a fixed deployment schedule
D. Trigger scaling from every individual incoming request

39 A reporting dashboard needs fast queries across data produced by several microservices, but direct cross-service joins are causing failures and high latency. Which design is most appropriate?

Data Management Medium
A. Build a read model from events published by the services
B. Merge all service schemas into one shared transactional database
C. Allow the dashboard to modify every service database directly
D. Perform synchronous joins through each service for every screen

40 A service requires several minutes to shut down because it keeps temporary work only in process memory. Which redesign best supports the twelve-factor principle of disposability?

The twelve-factor app methodology Medium
A. Prevent the platform from replacing unhealthy service instances
B. Make shutdown graceful and persist resumable work externally
C. Increase shutdown timeouts and keep all state in memory
D. Run administrative tasks inside the long-lived web process

41 A request passes synchronously through services A, B, and C. Each service independently retries a failed downstream call up to two additional times. If C remains unavailable, what architectural change most directly prevents retry amplification while preserving transient-failure recovery?

Cloud-native architecture Hard
A. Replace synchronous calls with longer timeouts at every service boundary
B. Move retry responsibility to service C and increase its request timeout
C. Enable three retries at every service and add randomized fixed delays
D. Retry at one designated boundary with backoff, jitter, and a bounded budget

42 A producer publishes CustomerAddressChanged events. Several consumers fail whenever the producer adds optional fields or changes its internal database schema. Which redesign best reduces structural coupling?

Loosely coupled services Hard
A. Require every consumer to deploy simultaneously whenever an event field changes
B. Expose the producer's schema registry as a shared runtime database dependency
C. Publish versioned business events with compatibility rules and consumer contract tests
D. Publish complete database rows so consumers can ignore fields they do not need

43 Instances register with a discovery service using leases. During a network partition, an isolated instance continues serving traffic but cannot renew its lease. Which behavior best limits routing to stale instances after connectivity is restored?

Service Discovery Hard
A. Expire registrations by lease TTL and combine discovery with active health checks
B. Retain all registrations until each instance explicitly sends a shutdown message
C. Route by static instance addresses and reconcile the registry once per deployment
D. Use infinite client-side cache entries and refresh them only after call failures

44 A service has instances with similar CPU capacity, but request durations vary from 10 ms to 30 s. Connections are reused through HTTP/2, so connection count poorly represents active work. Which load-balancing policy is most appropriate?

Load Balancing Hard
A. Least outstanding requests adjusted by observed latency and instance health
B. Consistent hashing based on the client's ephemeral source port
C. Round robin based only on the order in which instances were registered
D. Random selection weighted by each instance's configured memory allocation

45 Jobs arrive at an average rate of jobs per minute. One worker processes jobs per minute, and the target utilization is . Ignoring burst headroom, how many workers are required to sustain the average rate?

Autoscaling Hard
A. 18 workers
B. 15 workers
C. 12 workers
D. 16 workers

46 An order workflow reserves inventory, authorizes payment, and schedules shipment across independently owned databases. Atomic distributed transactions are unavailable. Which design best handles a payment failure after inventory has been reserved?

Data Management Hard
A. Use a saga that records progress and invokes an inventory-release compensation
B. Retry payment forever while retaining the inventory reservation indefinitely
C. Share the inventory database with the payment service for local rollback
D. Mark the order complete and repair payment inconsistencies in monthly batches

47 The same container image must run in development, staging, and production, but each environment uses different credentials and service endpoints. Which implementation most closely follows twelve-factor methodology?

The twelve-factor app methodology Hard
A. Compile environment-specific values into separate images during each release
B. Discover credentials by parsing environment names embedded in hostnames
C. Inject environment-specific configuration at runtime through the environment
D. Store credentials in source-controlled files selected by the deployment branch

48 A serverless function processes messages from an at-least-once queue and charges a customer through an external payment API. A timeout may occur after the API accepts a charge but before the function records success. Which mechanism best prevents duplicate charges?

Serverless architectures Hard
A. Use a deterministic idempotency key accepted and persisted by the payment API
B. Disable queue retries and route every timeout directly to a dead-letter queue
C. Acknowledge the queue message immediately before invoking the payment API
D. Increase function memory so the payment request usually completes more quickly

49 A streaming platform modeled after Netflix must continue presenting useful content when its personalized recommendation service is unavailable. Which resilience strategy best matches this requirement?

Case studies on Netflix, Amazon, Uber, etc. Hard
A. Fail the entire home page so all sections remain transactionally consistent
B. Retry recommendation requests without limit until personalization recovers
C. Redirect every user to the recommendation service's operational dashboard
D. Serve cached or generic recommendations through a circuit-breaker fallback

50 An Amazon-style retail platform partitions checkout into regional cells. A malformed configuration causes failures in one cell. Which property most directly reduces the incident's blast radius?

Case studies on Netflix, Amazon, Uber, etc. Hard
A. Every cell shares one global connection pool to maximize infrastructure usage
B. Each cell owns isolated compute and data resources for a bounded customer subset
C. All regional requests are routed through one stateful checkout coordinator
D. Configuration changes are applied globally before any cell begins health checks

51 An Uber-like dispatch system stores driver locations that update every few seconds. Matching must remain low-latency, while temporary location staleness is acceptable. Which architecture is most suitable?

Case studies on Netflix, Amazon, Uber, etc. Hard
A. Write all locations to one relational row protected by a global transaction
B. Run serializable joins over the billing database for every rider request
C. Maintain a partitioned geospatial index fed asynchronously by location events
D. Broadcast each rider request synchronously to every active driver's device

52 A user request triggers asynchronous work across six services and three message brokers. Logs contain timestamps but cannot reliably reconstruct one request because clocks differ and messages are retried. Which observability change provides the strongest causal trace?

Cloud-native architecture Hard
A. Attach propagated trace and span identifiers to calls, messages, logs, and retries
B. Synchronize clocks hourly and sort all service logs by local timestamp
C. Store each service's logs locally until the entire workflow has completed
D. Increase log verbosity and search for matching user-agent header values

53 Service A publishes an event and then waits synchronously for acknowledgments from every current consumer before committing its own transaction. What form of coupling has primarily been reintroduced?

Loosely coupled services Hard
A. Temporal coupling because producer progress depends on simultaneous consumer availability
B. Storage coupling because all consumers must use an identical database engine
C. Spatial coupling because every consumer must execute in the same operating system
D. Language coupling because all event handlers must use the producer's framework

54 A client-side discovery cache has a 60-second TTL. After an instance is terminated, clients continue routing to it until cache expiration, causing failures. Which modification reduces stale routing without making the registry a dependency for every request?

Service Discovery Hard
A. Query the registry synchronously before every request and disable local caching
B. Remove cache expiration and depend entirely on transport-level connection retries
C. Use background cache refresh, short negative feedback eviction, and bounded TTLs
D. Republish terminated addresses with higher priority until all clients reconnect

55 A cache cluster is scaled from 100 to 101 nodes. The system must minimize key remapping while keeping load reasonably balanced. Which technique best satisfies both goals?

Load Balancing Hard
A. Modulo hashing with the node count used as the divisor
B. Consistent hashing with virtual nodes distributed around the hash ring
C. Round robin with each key reassigned on every cache operation
D. Least connections with keys pinned to the first responding node

56 A CPU-based autoscaler repeatedly adds instances during short traffic spikes, then removes them before their caches warm. Latency worsens despite adequate average capacity. Which tuning is most likely to stabilize the system?

Autoscaling Hard
A. Terminate the oldest instances first whenever CPU falls below the target briefly
B. Disable readiness checks so newly started instances receive full traffic immediately
C. Add separate scale-up and scale-down thresholds plus a scale-down stabilization window
D. Use one identical CPU threshold and evaluate it more frequently in both directions

57 A service updates its database and publishes an integration event. Crashes between these operations sometimes produce missing events or events for rolled-back writes. Which pattern best resolves the dual-write problem without requiring a distributed transaction?

Data Management Hard
A. Publish the event first and delay the database update by a fixed interval
B. Retry both operations independently until their latest timestamps match
C. Write the state change and an outbox record in one local transaction
D. Let consumers poll the service's private tables using shared credentials

58 A web service scales horizontally, but user sessions are stored in each process's memory. Requests routed to a different instance lose session state. Which change most directly applies the twelve-factor processes principle?

The twelve-factor app methodology Hard
A. Prevent horizontal scaling and increase the capacity of one application process
B. Replicate process memory synchronously among every application instance
C. Store session state in an attached backing service and keep processes stateless
D. Configure the load balancer to preserve permanent client-to-instance affinity

59 A latency-sensitive serverless API receives unpredictable bursts but has a strict 100 ms response objective. Profiling shows that cold initialization alone takes 600 ms. Which intervention most directly addresses the measured tail-latency cause?

Serverless architectures Hard
A. Batch unrelated API requests into one invocation every five seconds
B. Increase the function timeout from one second to thirty seconds
C. Send failed invocations to a dead-letter queue after three attempts
D. Maintain provisioned concurrency for the latency-critical execution path

60 A read model consumes ordered account events from a partitioned stream. Events for the same account must remain ordered, but events for different accounts may be processed concurrently. Which partitioning strategy satisfies this constraint?

Data Management Hard
A. Partition by producer instance and rely on timestamps for account ordering
B. Partition by account identifier and preserve order within each partition
C. Partition by event type and process all event types in separate regions
D. Partition randomly for each event and sort by arrival time at consumers