ICT-Platform Dev Specialist FA cheat sheet
ICT-Platform Dev Specialist FA · Keep the key ideas within reach.
Platform Architecture and System Design
CAP theorem: a distributed data store can simultaneously guarantee at most two of Consistency, Availability, and Partition tolerance; under a network partition, choose CP (reject writes) or AP (accept writes, reconcile later).
PACELC extends CAP: if there is a Partition, choose A or C; Else (no partition), choose Latency or Consistency. DynamoDB defaults to PA/EL for eventually consistent reads; strongly consistent reads trade latency for consistency.
Fallacies of distributed computing: network is reliable, latency is zero, bandwidth is infinite, network is secure, topology never changes, one administrator, transport cost is zero, network is homogeneous. Each fallacy maps to a design mitigation (retries, compression, TLS, service discovery, observability, cost budgets, protocol versioning).
Saga pattern: coordinate a long-running distributed transaction as a sequence of local transactions, each with a compensating action. Use orchestration (central coordinator) or choreography (event-driven). Compensations must be idempotent and commutative where possible.
CQRS separates write model (commands) from read model (queries); pair with event sourcing for auditability. Eventual consistency between write and read sides is a design requirement, not a defect; expose read-your-writes via session stickiness or version tokens.
Idempotency key: client-generated unique token stored with the request result; a repeated request with the same key returns the stored result instead of re-executing. Required for safe retries on POST and payment operations; TTL must exceed the maximum retry window.
Circuit breaker states: Closed (normal), Open (fail fast for a cooldown), Half-Open (probe with limited traffic). Thresholds are failure rate or consecutive failures; half-open success count closes the circuit, any failure reopens it.
Bulkhead isolates resources (thread pools, connection pools, compute) per dependency or tenant so one slow dependency cannot exhaust shared capacity. Combine with timeouts, retries with jitter, and load shedding.
Twelve-factor app principles relevant to platform design: configuration in environment variables, stateless processes, disposability, dev/prod parity, logs as event streams, and admin processes run as one-off tasks.
Application Development and Programming
Immutability reduces shared-state bugs: in Java, fields declared final and collections wrapped with List.copyOf; in JavaScript, Object.freeze or spread-based updates; in Python, tuples and frozenset.
Dependency injection inverts control of object construction. Constructor injection makes dependencies explicit and testable; service locator hides them and is discouraged for new code.
Async/await does not create threads; it suspends the coroutine. In Python, blocking calls inside async functions block the event loop; use asyncio.to_thread or run_in_executor for CPU-bound or blocking I/O.
Garbage collection generations: young generation (Eden + survivor spaces) for short-lived objects, old generation for long-lived. Major GC pauses dominate tail latency; use G1 or ZGC for large heaps with pause targets.
Error handling rule: distinguish recoverable (retry, fallback) from non-recoverable (fail fast, propagate) errors. Never swallow exceptions silently; log with correlation ID and rethrow or wrap with context.
Concurrency primitives: mutex for mutual exclusion, semaphore for bounded concurrency, read-write lock when readers outnumber writers. Deadlock requires four conditions (mutual exclusion, hold-and-wait, no preemption, circular wait); break one.
Version pinning: lock files (package-lock.json, poetry.lock, go.sum) pin transitive dependencies. Reproducible builds require pinned toolchain versions and checksum verification.
Feature flags decouple deployment from release. Flag evaluation must be fast and failure-safe: if the flag service is unreachable, fall back to a default and never block the request path.
Data Modeling, Storage, and Database Management
Normalization: 1NF atomic columns; 2NF no partial dependency on part of a composite key; 3NF no transitive dependency on non-key attributes. Denormalize for read performance at the cost of write complexity and consistency risk.
ACID: Atomicity (all or nothing), Consistency (constraints preserved), Isolation (concurrent transactions do not interfere), Durability (committed data survives crash). Isolation levels trade consistency for concurrency.
Isolation levels and anomalies: Read Uncommitted allows dirty reads; Read Committed prevents dirty reads but allows non-repeatable reads; Repeatable Read prevents non-repeatable reads but may allow phantom reads; Serializable prevents all, often via predicate locking or SSI.
Index selectivity: high-cardinality columns benefit most from B-tree indexes. Composite index column order matters; a query can use a leftmost prefix of the index. Covering index includes all columns needed by the query, avoiding table lookups.
CAP for databases: relational OLTP typically chooses consistency; wide-column and document stores often choose availability with tunable consistency (quorum reads/writes: R + W > N ensures read-your-writes in a replica set of N).
Sharding key choice determines hot spots. Hash sharding distributes evenly but breaks range scans; range sharding supports scans but risks hot partitions. Consistent hashing minimizes data movement when nodes are added or removed.
Event sourcing stores state as an append-only sequence of events; current state is a fold over events. Snapshots bound replay time. Schema evolution requires versioned event types and upcasters.
Object storage (S3-compatible) is not a file system: eventual consistency for overwrites in some implementations, no partial writes, and strong read-after-write for new objects in modern S3. Use multipart upload for large objects and lifecycle policies for retention.
API Design, Integration, and Interoperability
HTTP semantics: GET safe and idempotent, PUT idempotent, DELETE idempotent, POST neither safe nor idempotent, PATCH not necessarily idempotent. Use status codes 200, 201, 204, 400, 401, 403, 404, 409, 422, 429, 500, 503 correctly.
REST maturity (Richardson): Level 0 single endpoint, Level 1 resources, Level 2 HTTP verbs and status codes, Level 3 hypermedia controls (HATEOAS). Most production APIs target Level 2.
Pagination: offset/limit is simple but unstable under inserts; cursor-based pagination uses an opaque token encoding the last seen sort key, giving stable results and better index usage.
Idempotency and retries: safe methods may be retried automatically; POST retries require an Idempotency-Key header. Exponential backoff with full jitter reduces thundering herd; cap retries and honor Retry-After on 429/503.
OpenAPI 3.x describes REST endpoints, schemas, and security schemes. Use it for contract-first development, code generation, and mock servers. Validate requests against the schema at the gateway.
gRPC uses Protocol Buffers over HTTP/2, supports unary and streaming RPCs, and generates strongly typed clients. Field numbers are the wire contract; never reuse or renumber them. Use reserved ranges for removed fields.
GraphQL: single endpoint, client-specified selection sets, strong typing via SDL. Risks include N+1 resolver queries (solve with DataLoader batching) and unbounded query depth (enforce depth and complexity limits).
Event-driven integration: at-least-once delivery means consumers must be idempotent. Use a dead-letter queue for poison messages, a schema registry for event contracts, and outbox pattern to atomically publish events with database writes.
API versioning strategies: URI path (/v1), custom header, media type (Accept: application/vnd.api+json;version=1). Breaking changes require a new major version; additive changes are backward compatible.
Cloud, Infrastructure, and Deployment Operations
Infrastructure as Code: declarative desired state (Terraform, CloudFormation) vs imperative scripts. Terraform state must be stored remotely with locking (S3 + DynamoDB or equivalent) to prevent concurrent apply corruption.
Immutable infrastructure: replace instances rather than patch them. Blue/green deployment switches traffic between two identical environments; canary releases route a small percentage of traffic to the new version and promote on healthy metrics.
Kubernetes core objects: Pod (smallest deployable unit), Deployment (replica management and rolling updates), Service (stable virtual IP and load balancing), Ingress (HTTP routing), ConfigMap/Secret (configuration), HorizontalPodAutoscaler (scale on CPU/memory/custom metrics).
Kubernetes rollout controls: maxSurge and maxUnavailable define rolling update behavior; readiness probes gate traffic, liveness probes restart unhealthy containers, startup probes protect slow-starting apps. Never use liveness probes for dependency checks.
Container image hygiene: minimal base images (distroless, alpine), multi-stage builds to exclude build tooling, non-root user, pinned digests, and vulnerability scanning in CI. Image size affects pull latency and cold-start time.
CI/CD pipeline stages: build, unit test, static analysis, artifact publish, integration test, deploy to staging, smoke test, progressive production rollout. Gates must be automated; manual approvals are reserved for high-risk changes.
Cloud cost and reliability: use autoscaling, spot/preemptible instances for fault-tolerant workloads, reserved capacity for steady-state, and lifecycle policies for storage. Multi-AZ is the default for production; multi-region adds cost and complexity for disaster recovery.
Secret management: never commit secrets. Use a managed secret store (Vault, AWS Secrets Manager, Azure Key Vault) with short-lived credentials and automatic rotation. Inject at runtime, not build time.
Security, Identity, and Access Control
OAuth 2.0 roles: resource owner, client, authorization server, resource server. Authorization Code flow with PKCE is required for public clients (SPAs, mobile). Client Credentials flow is for machine-to-machine. Implicit flow is deprecated.
OIDC adds an identity layer to OAuth 2.0: the ID token is a signed JWT containing issuer, subject, audience, expiration, and nonce. Validate signature, iss, aud, exp, and nbf on every request.
JWT structure: header.payload.signature, base64url encoded. The payload is readable, not encrypted; never store secrets. Signature algorithms: RS256 (asymmetric, preferred) vs HS256 (shared secret). Reject 'none' algorithm.
Access control models: RBAC assigns permissions to roles and roles to users; ABAC evaluates attributes (user, resource, environment) via policy; ReBAC models relationships (owner, editor, viewer) and is suited to hierarchical resources.
Principle of least privilege: grant the minimum permissions required for the task and scope them tightly (resource ARN, condition keys). Use temporary credentials via STS instead of long-lived access keys.
OWASP Top 10 categories to design against: broken access control, cryptographic failures, injection, insecure design, security misconfiguration, vulnerable components, identification and authentication failures, software and data integrity failures, logging and monitoring failures, SSRF.
Encryption: TLS 1.2+ in transit; AES-256-GCM at rest. Envelope encryption uses a data key encrypted by a KMS master key. Key rotation limits blast radius; separate keys per tenant or data classification.
Defense in depth: WAF, rate limiting, input validation, parameterized queries, output encoding, CSRF tokens for cookie-based sessions, and Content Security Policy headers. Never rely on client-side validation for security.
Performance, Reliability, and Monitoring
SLI (indicator) measures service behavior (latency, error rate, throughput, saturation); SLO (objective) is a target range for an SLI over a window; SLA is a contractual commitment with consequences. Error budget = 1 - SLO.
The Four Golden Signals: latency (success vs error), traffic, errors, saturation. Use them as the default dashboard and alerting baseline for any service.
Percentiles vs averages: p50 hides tail latency; p95 and p99 capture user-visible pain. Averages are misleading for skewed distributions. Alert on burn rate of the error budget rather than raw thresholds.
USE method (resources): Utilization, Saturation, Errors. RED method (services): Rate, Errors, Duration. Choose based on whether you monitor infrastructure or request-driven services.
Distributed tracing: propagate a trace context (W3C traceparent header) across services; each span records operation, duration, and attributes. Sampling (head-based or tail-based) controls cost while preserving error traces.
Load testing types: smoke (minimal), load (expected peak), stress (beyond capacity), soak (long duration for memory leaks), spike (sudden burst). Measure p99 latency and error rate at each level; identify the knee point.
Retry storms amplify outages. Use exponential backoff with jitter, circuit breakers, and retry budgets (e.g., retries <= 10% of requests). Server-side load shedding returns 503 with Retry-After when saturated.
Capacity planning: measure requests per second per instance at target latency, add headroom for N+1 redundancy (survive one AZ or instance loss), and account for autoscaling warm-up time.
Development Lifecycle, Testing, and Governance
Test pyramid: many fast unit tests, fewer integration tests, few end-to-end tests. Inverted pyramid (many E2E) produces slow, flaky pipelines. Contract tests verify consumer-provider compatibility without full E2E.
TDD cycle: Red (failing test), Green (minimal passing code), Refactor. Tests drive design and provide a regression safety net; coverage percentage is a weak proxy for test quality.
Code review criteria: correctness, security, readability, test coverage of changed behavior, and adherence to team conventions. Small pull requests (under ~400 lines) review faster and find more defects.
Trunk-based development: short-lived branches merged to main at least daily, feature flags for incomplete work, and CI on every merge. Long-lived branches increase merge conflict cost and delay feedback.
Semantic versioning: MAJOR.MINOR.PATCH. Increment MAJOR for breaking changes, MINOR for backward-compatible features, PATCH for backward-compatible fixes. Pre-release and build metadata use suffixes.
Change management: every production change should be traceable to a commit, reviewed, tested, and reversible. Deployment records, runbooks, and post-incident reviews (blameless) close the loop.
Governance artifacts: architecture decision records (ADRs) capture context and consequences of decisions; threat models identify risks early; data classification policies define handling requirements.
DORA metrics: deployment frequency, lead time for changes, change failure rate, and time to restore. They measure delivery performance and stability together; optimize for both, not one.