Knowledge Check - Application Service Integration
Test your understanding of the key concepts from Module 4. Select the best answer for each question, then submit to see your results. You need to score at least 60% to pass.
TaskBoard's API reads tasks from DBaaS for PostgreSQL. Read load grows, and a developer proposes this change:
write_engine = create_engine(primary_url)
read_engine = create_engine(standby_url) # point reads at a standby instance
What is the correct way to scale TaskBoard's reads?
PostgreSQL standby instances serve high availability, and read connections to standby nodes are not allowed, so every query hits the primary. A cache in front of the database, such as cache-aside on In-Memory DB, is the read-scaling layer. Raising the instance count or changing the replication mode adds standbys for failover, not readable replicas.
A developer writes this boto3 client for TaskBoard's attachments. The code fails before it reaches the bucket.
s3 = boto3.client(
"s3",
aws_session_token=os.environ["IONOS_TOKEN"], # Cloud API bearer token
region_name="eu-central-3",
)
Which change makes the client work with IONOS Cloud Object Storage?
Object Storage authenticates S3 requests with an Access Key and Secret Key, and boto3 needs the regional endpoint explicitly, or it talks to AWS. The Cloud API bearer token is not an S3 credential, and IAM and the Security Token Service (STS) are not supported. The region name alone does not change the endpoint.
TaskBoard's worker consumes task-events with enable.auto.commit set to False. Which handling of a message gives at-least-once delivery without letting a poison message block its partition?
Committing after processing gives at-least-once delivery, and forwarding a failing message to a retry or dead-letter topic lets the partition move on. Committing first is at-most-once and loses the message on failure. An endless retry loop blocks every later message in the partition.
TaskBoard's task-events topic has 6 partitions. During a backlog, a developer scales the notifier Deployment, which uses one group.id, from 6 to 12 replicas. What happens?
Within a consumer group, each partition is read by at most one consumer, so the partition count is the parallelism ceiling. Adding consumers beyond it leaves them idle, and the partition count is a topic setting (number_of_partitions), not a result of the consumer count. To raise the ceiling, add partitions, in multiples of 3 for the cluster's three brokers.
A bulk import calls AI Model Hub for 2,000 task summaries in parallel. Most requests fail with 429 and the error code RATE_LIMIT_EXCEEDED. Which fix matches how AI Model Hub limits requests?
The default limit is 5 requests per second per model, with bursts of up to 10, enforced per contract and not per user. A paced Kafka consumer keeps the rate below that limit, and the Retry-After header gives the wait time after a 429. Immediate retries hit the same limit again, and streaming requests to the same model count toward its limit as well.