DOP-C02 practice question: Application configuration and feature flags (AppConfig)
Configuration Management and IaC A free question from our original DOP-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.
A game studio is turning on a new matchmaking algorithm for its live players. The algorithm is controlled by a feature flag that the game service reads from AWS AppConfig.
The studio wants the new algorithm enabled gradually, starting with a small share of players and increasing over about 30 minutes. A player who has received the new algorithm should keep it for the rest of the rollout, whichever game server handles the request. If the service's error alarm goes into ALARM during the rollout, the flag should be rolled back automatically without a code deployment.
Which approach meets these requirements?
Choose one answer.
AA. Deploy the feature flag with an AppConfig entity-based gradual deployment keyed on player ID, and add a monitor on the error alarm so the rollout reverts when it fires.
BB. Store the flag in an environment variable in the game service's container definition, and redeploy the service with a new value whenever the studio wants to change the rollout.
CC. Write the flag to a Parameter Store parameter, and run a Lambda function on a schedule that increases a percentage in the parameter while a human checks the error dashboard.
DD. Change the feature flag in the game's launch configuration file and let each game server reload the file on its next restart, so that players move to the new algorithm over time.
Show the answer and explanation
Answer: A
A. Right: Correct. AppConfig deploys flag changes in stages under a deployment strategy, and an entity-based gradual deployment keeps each player on the same flag value during the rollout. A monitor based on the CloudWatch alarm rolls the deployment back automatically. Learn more: Working with deployment strategies (opens in a new tab)
B. Wrong: Each change would need a new deployment, so the rollout is not gradual and rollback is slow. The error alarm would also not reverse the change automatically.
D. Wrong: Restarts happen on their own schedule, so the rollout is uneven and hard to control. No alarm is connected to the change, so a bad algorithm would keep running until someone notices.
Explanation
AppConfig feature flags can be deployed with a strategy that adds the change in stages over a set time, and an entity-based gradual deployment through AppConfig Agent keeps each player on the value they first received. A monitor tied to a CloudWatch alarm rolls the deployment back when the alarm fires. Environment variables, scheduled scripts and restarts either need a redeployment or leave the rollback to people.
Want more on Application configuration and feature flags (AppConfig)? The 5 full-length practice sets have 7 more Application configuration and feature flags (AppConfig) questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →