Automation Scripting for Operations Questions

Writing scripts and tooling to automate operational and delivery tasks: shell and Python scripting, glue automation, toil reduction, and operational efficiency. Covers automating repetitive infrastructure and deployment work and building internal tooling that raises operational leverage. The concern is task-level automation and scripting, distinct from full pipeline or infrastructure-as-code frameworks.

MediumTechnical
77 practiced

You are building automation that calls an external payment API. Describe a robust error-handling strategy: include timeouts, retries with exponential backoff and jitter, idempotency keys for non-idempotent endpoints, circuit-breaker logic, alerting thresholds, and how to surface incidents to operators without causing noise.

HardTechnical
67 practiced

Implement an async Python client using asyncio and aiohttp that calls thousands of REST endpoints efficiently. Requirements: reuse connection pools, enforce a concurrency limit (e.g., 500 concurrent requests), implement exponential backoff with jitter for 429/5xx responses, support batching for slow endpoints, and perform graceful shutdown that waits for in-flight requests to finish. Provide a code sketch for the main worker loop and semaphore-based concurrency control.

MediumTechnical
96 practiced

Write a production-safe log rotation script (choose Bash or Python) that compresses logs older than 7 days into gzip archives, keeps most recent N compressed archives per service, verifies archive validity before deleting originals, and is safe to run concurrently for different services. Ensure idempotency and consider partial failures.

HardTechnical
91 practiced

During a release, rollbacks failed because automation couldn't fetch required secrets (secrets had been rotated or were missing). Describe immediate mitigation steps to restore rollbacks safely, and propose design changes to make rollback automation resilient to secret failures (fallback credentials, local cached encrypted secrets, staged rotation). Also propose CI/policy changes to prevent future secret-related rollback failures.

HardTechnical
116 practiced

Design the core algorithm and provide pseudocode for a Python file sync tool that reconciles a large local directory tree to remote object storage (e.g., S3). Requirements: avoid re-uploading unchanged files using checksums, support chunked multipart uploads for large files, resume interrupted uploads, run with concurrency limits, and be resilient to partial failures. Explain data structures for tracking state, how to detect renames vs new files, and how to implement resume tokens.

Unlock Full Question Bank

Get access to all Automation Scripting for Operations interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.