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 store all data in a single file
B. To run applications only on local servers
C. To avoid using automated deployment tools
D. To build scalable and resilient cloud applications

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

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

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

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

4 How do loosely coupled services commonly communicate?

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

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

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

6 Where are service locations commonly recorded for service discovery?

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

7 What does a load balancer do?

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

8 Why does a load balancer perform health checks?

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

9 What is autoscaling?

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

10 Which metric is commonly used to trigger autoscaling?

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

11 Which data management pattern is common in microservices?

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

12 What does eventual consistency mean in a distributed system?

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

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 environment variables
C. In hard-coded source values
D. Inside user interface images

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

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

15 How should twelve-factor application processes generally operate?

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

16 Who manages the underlying servers in a serverless architecture?

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

17 What commonly causes a serverless function to execute?

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

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 keep every feature in one process
D. To require one deployment for all changes

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 can own and develop services independently
B. Teams place all code in one component
C. Teams must share one deployment schedule
D. Teams avoid using service interfaces

20 Why did Uber adopt microservices as its platform grew?

Case studies on Netflix, Amazon, Uber, etc. Easy
A. To place every feature in one database procedure
B. To eliminate all cloud infrastructure
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. Require every service to use a shared internal object model
B. Route all service requests through a single application process
C. Place all services in one repository and release them together
D. Give each service a clear business capability and deployment pipeline

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 can evolve without direct dependencies on the producer
B. The producer and consumers share one deployment lifecycle
C. The producer can directly control every consumer transaction
D. Consumers always process events in the same global order

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

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

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 4 connections
B. The instance with 19 connections
C. The instance with 12 connections
D. The instance with 7 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 number and age of queued messages
C. The amount of allocated disk storage
D. The count of source-code repositories

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. Use one foreign key across all three service databases
C. Use a saga that invokes a payment compensation action
D. Repeat every operation until all databases become identical

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 environment-based configuration outside the application code
C. In separate branches containing modified application source files
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. Send logs to another thread in the same process
B. Store logs permanently in the container image
C. Write logs as event streams to standard output
D. Disable replacement of containers that contain log files

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. Create a new database table for each invocation
B. Use an idempotency key for each payment operation
C. Disable application logging during payment processing
D. Increase the function's memory for every 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. Increase the event retention period in the message broker
B. Store larger response objects in the function deployment package
C. Replace asynchronous events with synchronous database triggers
D. Configure provisioned concurrency for expected baseline traffic

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. Use a circuit breaker and return cached recommendations
C. Stop all user requests until personalization fully recovers
D. Retry each failed request forever without a delay

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. Small teams own services and their operational outcomes
B. Quarterly releases combine every service into one deployment
C. One central team deploys and operates every business service
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 static website backed by a single read-only database
B. Event streams combined with geospatially partitioned services
C. A monthly data export processed by desktop applications
D. A nightly batch job using one global spreadsheet

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. Graceful degradation using cached or reduced functionality
D. Coordinated shutdown of every dependent application service

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. Remove older fields as soon as the new field is introduced
B. Change the response format without publishing a new contract
C. Rename all existing fields and require immediate consumer updates
D. Add an optional field while preserving existing response fields

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. Long-lived client caches without endpoint refreshes
C. Static host entries distributed during application builds
D. Random port changes performed without registry updates

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. Send every user permanently to the first available server
B. Copy all sessions manually whenever an instance is added
C. Reduce the deployment to one large application instance
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. Replace CPU monitoring with a fixed deployment schedule
C. Trigger scaling from every individual incoming request
D. Add stabilization windows and separate scaling thresholds

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. Merge all service schemas into one shared transactional database
B. Perform synchronous joins through each service for every screen
C. Allow the dashboard to modify every service database directly
D. Build a read model from events published by the services

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. Run administrative tasks inside the long-lived web process
B. Increase shutdown timeouts and keep all state in memory
C. Make shutdown graceful and persist resumable work externally
D. Prevent the platform from replacing unhealthy service instances

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. Retry at one designated boundary with backoff, jitter, and a bounded budget
B. Enable three retries at every service and add randomized fixed delays
C. Move retry responsibility to service C and increase its request timeout
D. Replace synchronous calls with longer timeouts at every service boundary

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 complete database rows so consumers can ignore fields they do not need
D. Publish versioned business events with compatibility rules and consumer contract tests

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. Route by static instance addresses and reconcile the registry once per deployment
C. Retain all registrations until each instance explicitly sends a shutdown message
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. Random selection weighted by each instance's configured memory allocation
B. Least outstanding requests adjusted by observed latency and instance health
C. Round robin based only on the order in which instances were registered
D. Consistent hashing based on the client's ephemeral source port

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. 16 workers
B. 18 workers
C. 15 workers
D. 12 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. Mark the order complete and repair payment inconsistencies in monthly batches
B. Share the inventory database with the payment service for local rollback
C. Retry payment forever while retaining the inventory reservation indefinitely
D. Use a saga that records progress and invokes an inventory-release compensation

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. Store credentials in source-controlled files selected by the deployment branch
B. Compile environment-specific values into separate images during each release
C. Inject environment-specific configuration at runtime through the environment
D. Discover credentials by parsing environment names embedded in hostnames

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. Acknowledge the queue message immediately before invoking the payment API
B. Increase function memory so the payment request usually completes more quickly
C. Disable queue retries and route every timeout directly to a dead-letter queue
D. Use a deterministic idempotency key accepted and persisted by the payment API

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. Serve cached or generic recommendations through a circuit-breaker fallback
C. Redirect every user to the recommendation service's operational dashboard
D. Retry recommendation requests without limit until personalization recovers

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. Each cell owns isolated compute and data resources for a bounded customer subset
B. Every cell shares one global connection pool to maximize infrastructure usage
C. Configuration changes are applied globally before any cell begins health checks
D. All regional requests are routed through one stateful checkout coordinator

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. Broadcast each rider request synchronously to every active driver's device
B. Run serializable joins over the billing database for every rider request
C. Write all locations to one relational row protected by a global transaction
D. Maintain a partitioned geospatial index fed asynchronously by location events

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. Store each service's logs locally until the entire workflow has completed
C. Increase log verbosity and search for matching user-agent header values
D. Synchronize clocks hourly and sort all service logs by local timestamp

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. Language coupling because all event handlers must use the producer's framework
C. Storage coupling because all consumers must use an identical database engine
D. Spatial coupling because every consumer must execute in the same operating system

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

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. Consistent hashing with virtual nodes distributed around the hash ring
B. Modulo hashing with the node count used as the divisor
C. Least connections with keys pinned to the first responding node
D. Round robin with each key reassigned on every cache operation

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. Disable readiness checks so newly started instances receive full traffic immediately
B. Add separate scale-up and scale-down thresholds plus a scale-down stabilization window
C. Terminate the oldest instances first whenever CPU falls below the target briefly
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. Let consumers poll the service's private tables using shared credentials
B. Publish the event first and delay the database update by a fixed interval
C. Write the state change and an outbox record in one local transaction
D. Retry both operations independently until their latest timestamps match

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. Send failed invocations to a dead-letter queue after three attempts
C. Increase the function timeout from one second to thirty seconds
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 account identifier and preserve order within each partition
B. Partition by event type and process all event types in separate regions
C. Partition randomly for each event and sort by arrival time at consumers
D. Partition by producer instance and rely on timestamps for account ordering