Top 30 Configuration Interview Questions and Answers
30 multiple-choice questions on Configuration, drawn from 30 bites out of the 48 tagged Configuration on Tezvyn. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.
30 questions. Pick an answer, or open “Show the answer” to read it.
Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.
Question 1 of 30
When using the 'extends' property in tsconfig.json, how are compilerOptions and file-related properties handled?
Show the answer
Answer: b · compilerOptions are merged recursively, while file-related properties are completely replaced.
The card states that "compilerOptions are merged recursively, but file-related properties like include are completely replaced, not combined." This means that an extending configuration will add to or override specific compiler options, but its file-related arrays will entirely supersede those from the base configuration. Option C is a common misconception, as it incorrectly assumes all properties are merged.
Read the full bite: tsconfig.json: The Rulebook for Your TypeScript Project
Question 2 of 30
What is the primary function of the package.json file when a new developer sets up a Node.js project?
Show the answer
Answer: d · It lists all external code the project depends on and defines how to run common tasks.
The correct answer is B because package.json explicitly lists all external libraries (dependencies) required for the project and defines runnable scripts. This allows a new developer to quickly install everything with 'npm install' and run tasks like 'npm start', making the project self-contained and reproducible. Option B is incorrect because while package.json can suggest a Node.js version, its primary role for initial setup is dependency and script management.
Read the full bite: package.json: The Blueprint for Your Node.js Project
Question 3 of 30
You've committed a file to your Git repository. Later, you decide this file should not be tracked. What is the correct way to stop Git from tracking it using .gitignore?
Show the answer
Answer: c · Use git rm --cached <file> and then add the file's pattern to .gitignore.
The card states that .gitignore only works on untracked files. To stop tracking a file already committed, you must first remove it from the index using git rm --cached <file>, then add its pattern to .gitignore to prevent it from being tracked again. Simply adding it to .gitignore (option B) will not affect files already under version control.
Question 4 of 30
When using a .env file for local development, what is the most critical step to prevent accidental exposure of sensitive information?
Show the answer
Answer: c · Ensuring the .env file is listed in your project's .gitignore
The card explicitly states that 'The biggest mistake is committing your .env file to Git, exposing all your secrets' and that your '.gitignore file must contain a line with .env to prevent committing secrets.' This makes preventing version control exposure the most critical step. Storing only non-sensitive data (D) contradicts the primary purpose of .env for secrets.
Read the full bite: Environment Variables: Config Outside Your Code
Question 5 of 30
What is the main limitation of using Docker Compose alone for production environments?
Show the answer
Answer: c · It lacks features for high availability and automatic scaling.
The card explicitly states that Docker Compose should not be used alone for production because it lacks high-availability, fault tolerance, load balancing, and auto-scaling. The other options describe functionalities that Docker Compose is designed to handle, such as defining multi-service applications, managing networks, and supporting persistent data via volumes.
Read the full bite: The docker-compose.yml File: Your App's Blueprint
Question 6 of 30
When you run docker compose up with no -f flags in a directory containing both compose.yaml and compose.override.yaml, what happens?
Show the answer
Answer: d · Compose merges compose.override.yaml on top of compose.yaml automatically
Compose auto-loads and deep-merges compose.override.yaml over the base. It does not ignore it (A) nor wholesale-replace the base (C); merging is the defined behavior, not an error (B).
Read the full bite: Structuring Compose files across environments
Question 7 of 30
What type of configuration is generally NOT recommended to be managed directly via environment variables in docker-compose.yml or .env files for production deployments?
Show the answer
Answer: d · Sensitive production credentials, such as private API keys or database passwords.
The card explicitly advises against storing sensitive production secrets directly in docker-compose.yml or .env files for production, recommending dedicated secrets management tools instead. The other options describe valid and recommended uses for environment variables in Docker Compose.
Question 8 of 30
What is the primary benefit of using extended Docker Compose files for different environments?
Show the answer
Answer: c · To manage environment-specific configuration variations for a single application efficiently.
The card states that extending Compose files provides a "clean, DRY (Don't Repeat Yourself) way to manage these variations" for a single application across different environments. Option B is incorrect because the card advises against using this for entirely separate applications. Option A is incorrect as Compose is not an orchestrator like Kubernetes, but can be outgrown by it. Option D is incorrect because the purpose is to manage variations, not to enforce identical settings.
Read the full bite: Extending Compose Files for Different Environments
Question 9 of 30
What is the main advantage Hydra offers for managing configurations in complex applications, particularly in machine learning?
Show the answer
Answer: d · It enables the systematic composition of small, reusable configuration pieces to manage numerous experimental variations.
Hydra's core benefit is its ability to compose modular configuration components, allowing users to systematically manage and swap out different settings for various experimental runs. The card explicitly states it avoids a 'monolithic file' approach, making option A incorrect.
Read the full bite: Hydra: Composable Configuration for Complex Apps
Question 10 of 30
What is a primary benefit of implementing Configuration as Code?
Show the answer
Answer: a · It provides a version-controlled, repeatable, and consistent way to manage system settings across environments.
Configuration as Code's core purpose is to ensure consistency and repeatability of system settings across different environments by treating them as version-controlled files. While it involves automation, it does not completely automate all system administration tasks. It is explicitly stated that CaC is not a secrets management solution; sensitive data should be handled by dedicated vaults.
Read the full bite: Configuration as Code: Version Control for Your Settings
Question 11 of 30
A developer wants a Service to automatically route traffic to a specific set of Pods. How would Kubernetes achieve this?
Show the answer
Answer: a · By matching the Service's selector to labels on the target Pods.
The card explains that Services use selectors to identify which Pods they should operate on, matching labels on those Pods for flexible grouping. Annotations are for non-queryable metadata, not for selection by the Kubernetes control plane.
Read the full bite: Labels and Selectors: The Glue of Kubernetes
Question 12 of 30
Which approach best balances performance, testability, and type safety when making configuration available to FastAPI path operations?
Show the answer
Answer: b · Cache the Settings instance with lru_cache and inject it via FastAPI dependency injection
Caching with lru_cache parses config once at startup instead of on every request, and dependency injection lets tests easily override settings. Option D is tempting but wrong because a direct global import is brittle and harder to mock than an injected dependency.
Read the full bite: Manage dev, staging, and prod configs in a large FastAPI app
Question 13 of 30
When configuring a .NET app for multiple environments, which approach best prevents connection string secrets from being exposed?
Show the answer
Answer: b · Inject values via environment variables or a secret store at runtime, and prefer authentication methods that eliminate passwords from the string
Injecting via environment variables or a secret store keeps secrets out of source control and compiled binaries, while managed identities remove passwords entirely. Preprocessor directives are a tempting distractor because they appear to separate environments but still embed secrets in the assembly that can be extracted with ILDASM.
Question 14 of 30
A team following Twelve-Factor Factor III stores configuration in environment variables. What operational benefit does this provide for CI/CD and scalability?
Show the answer
Answer: a · One build artifact can be promoted across environments and new instances start with the correct context immediately.
Storing config in environment variables keeps the codebase identical across stages, enabling a single artifact to be promoted through CI/CD and allowing new instances to read the correct settings at startup for horizontal scaling. The distractor about keeping only secrets in env vars is wrong because Factor III applies to all deployment-specific configuration, not just sensitive data.
Read the full bite: What is Twelve-Factor's config recommendation for CI/CD and scalability?
Question 15 of 30
What is a primary advantage of using Pydantic BaseSettings for application configuration?
Show the answer
Answer: b · It provides a structured, type-safe way to load and validate settings from multiple prioritized sources.
BaseSettings excels at providing a typed contract for configuration, automatically loading and validating values from sources like environment variables and .env files with a defined priority. Option D is incorrect because BaseSettings loads configuration at initialization time and is not designed for dynamic runtime changes.
Read the full bite: Pydantic BaseSettings: Typed, Layered Configuration
Question 16 of 30
Which statement about Kubernetes Secrets is accurate?
Show the answer
Answer: a · Secrets store sensitive data; base64 is only encoding, and real protection needs RBAC and encryption at rest
Secrets are for sensitive data, but base64 is encoding, not encryption, so security relies on RBAC and enabling encryption at rest. They differ from ConfigMaps and can be mounted as files too.
Question 17 of 30
What is a key practical advantage of mounting a ConfigMap as a volume rather than injecting it as environment variables?
Show the answer
Answer: a · Volume-mounted ConfigMaps are updated in place, so changes can be picked up without restarting the Pod
Mounted ConfigMaps are refreshed by the kubelet so an app re-reading the file gets updates without a restart, while env vars are fixed at container start. Both can carry multiple text keys.
Read the full bite: Two ways to consume a ConfigMap in a Pod
Question 18 of 30
Which scenario best illustrates the appropriate use of Pydantic Settings in a FastAPI application?
Show the answer
Answer: c · Storing a database connection string that differs between development, staging, and production environments.
Pydantic Settings is specifically designed to manage configuration values that vary across different deployment environments, such as database URLs or API keys, ensuring they are loaded securely and validated. While Pydantic is used for request body validation, Pydantic Settings focuses on environment-dependent application settings, not static constants or request schemas.
Read the full bite: FastAPI: Managing Environment-Specific Settings
Question 19 of 30
Why can setting a connection pool's maximum size too high actually hurt overall throughput?
Show the answer
Answer: b · It can exceed the database's connection limit and cause resource thrashing
Too many connections can exhaust the database's connection ceiling and memory and cause excessive context switching, lowering throughput. Larger pools do not force reconnects or disable prepared statements, and drivers do not cap pools at 10.
Read the full bite: Connection pooling and its key parameters
Question 20 of 30
Why would you use a ConfigMap rather than hardcoding a database hostname into a container image at build time?
Show the answer
Answer: b · To avoid rebuilding the image when promoting the same build from staging to production
ConfigMaps separate configuration from image content so the same immutable build can run across environments with different settings without rebuilding. Distractor A is tempting because the data is encoded, but ConfigMaps are not encrypted by default and should never hold sensitive connection strings.
Read the full bite: ConfigMap decouples config from container images
Question 21 of 30
What is a key benefit of injecting ConfigMaps and Secrets as environment variables in Kubernetes Pods?
Show the answer
Answer: a · It allows a single container image to be deployed consistently across multiple environments with distinct configurations.
The card states that externalizing configuration allows deploying the same image to different environments without rebuilding. Option B is incorrect because the card explicitly says this method is not for dynamic updates, and option C is incorrect because the card warns that any process can inspect environment variables, potentially exposing sensitive data.
Read the full bite: Kubernetes: Inject ConfigMaps & Secrets as Env Vars
Question 22 of 30
What is the main advantage of using a projected volume for configuration over traditional environment variables?
Show the answer
Answer: d · It enables configuration updates to be applied to a running Pod without requiring a restart.
The card states that projected volumes provide a way to "push configuration updates to running Pods without a restart," which is their primary benefit over environment variables. Option B is incorrect because the card explicitly mentions that "updates aren't instant; there's a delay."
Read the full bite: Projected Volumes: Mount Config as Live Files
Question 23 of 30
What is a primary advantage of using a Procfile for an application composed of multiple services?
Show the answer
Answer: b · It allows the platform to manage and scale different process types independently.
The card states that a Procfile allows the platform to "manage and scale each part independently," which is crucial for applications with multiple components like web servers and background workers. Option D is incorrect because independent scaling often means services can run on different resources, not necessarily the same server.
Read the full bite: Procfile: Declare Your App's Startup Commands
Question 24 of 30
Which task is NOT suitable for the Kubernetes Downward API?
Show the answer
Answer: a · A microservice querying the status of other Pods in its Deployment.
The Downward API is designed solely for a Pod to gain information about itself, such as its own name, IP, or resource limits. It cannot be used to query information about other Pods or any other Kubernetes objects; such cluster-wide information requires interacting with the main Kubernetes API server.
Read the full bite: The Kubernetes Downward API: Pod Self-Awareness
Question 25 of 30
What is the primary reason to mark a Kubernetes Secret or ConfigMap as immutable?
Show the answer
Answer: c · To reduce the load on the Kubernetes API server by eliminating constant polling for changes.
The card explicitly states that immutable objects reduce API server load by eliminating the need for Kubernetes to constantly check for updates. Option D is incorrect because immutable objects prevent automatic updates; changes require creating a new object and rolling out new Pods.
Read the full bite: Immutable Secrets & ConfigMaps: Write-Once Configuration
Question 26 of 30
Which scenario best illustrates the primary benefit of using environment variables for application configuration?
Show the answer
Answer: d · An application needs to connect to different databases in development and production without altering its codebase.
The primary benefit of environment variables is to allow applications to adapt to different environments (like development vs. production) without requiring changes to the source code. Option D directly reflects this by showing how a database connection can change based on the environment variable. Option A is incorrect because environment variables do not automatically encrypt data; their security benefit comes from keeping sensitive information out of version control.
Read the full bite: Environment Variables: Configuration Outside Code
Question 27 of 30
What type of information is explicitly warned against storing directly in a configuration file that is committed to version control?
Show the answer
Answer: b · Sensitive API keys or database passwords
The card explicitly states that sensitive secrets like passwords or private keys should never be stored in a plain text config file committed to version control, recommending environment variables or a secrets management service instead. The other options represent appropriate uses for configuration files.
Read the full bite: Configuration Files: Separating Code from Settings
Question 28 of 30
In a Twelve-Factor App, which of the following should typically be stored using environment variables?
Show the answer
Answer: b · Database connection strings
The card specifies that environment variables are for values that change between deployments, such as database connection strings. Route definitions, dependency injection wiring, and fixed internal constants are considered part of the application's code or internal configuration that remains constant across deploys.
Read the full bite: The Twelve-Factor App: Store Config in the Environment
Question 29 of 30
What is a critical security limitation of using Product Flavors (or react-native-config) for environment-specific configurations?
Show the answer
Answer: c · Sensitive data bundled within the app package can be extracted through reverse engineering.
The card explicitly states that "Since these configuration values are bundled into the app package, they can be extracted by a determined user through reverse engineering." Option B is incorrect because the card does not mention encryption; it implies the values are bundled in a way that makes them directly extractable.
Read the full bite: Android Product Flavors for App Environments
Question 30 of 30
In a Public GitLab project, what happens to non-member access when project-based pipeline visibility is cleared?
Show the answer
Answer: a · Non-members see pipeline status on merge requests and commits, but logs and artifacts require Reporter role or higher
Clearing project-based pipeline visibility narrows access so non-members see only commit and merge request status, while logs and artifacts require Reporter role or higher. The non-project member setting is irrelevant here because it only applies when the project-based toggle is enabled.
Could you explain these out loud?
That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.