ICT-Platform Dev Specialist FA study materials
ICT-Platform Dev Specialist FA study resources

ICT-Platform Dev Specialist FA practice questions

One question at a time. Build your ICT-Platform Dev Specialist FA understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1Platform Architecture and System Design

In a layered platform architecture, which layer is responsible for enforcing cross-cutting concerns such as authentication, request logging, and rate limiting before business logic executes?

  1. The domain service layer
  2. The API gateway or edge layer Correct answer.
  3. The persistence adapter layer
  4. The client presentation layer

Explanation

Edge/gateway layers intercept traffic before it reaches domain logic, so cross-cutting concerns like authentication, logging, and throttling are centralized there. Pushing these into domain services duplicates logic and couples business code to infrastructure.

Question 2Platform Architecture and System Design

A platform team needs to replace a relational database with an event store without rewriting business rules. Which design principle most directly enables this?

  1. Inheritance from a shared base entity class
  2. Storing SQL strings inside domain entities
  3. Compiling the domain model into the web tier
  4. Dependency inversion with repository interfaces owned by the domain Correct answer.

Explanation

Dependency inversion lets the domain define repository contracts while infrastructure supplies implementations, so storage can be swapped without touching business rules. This is the core of ports-and-adapters architecture.

Question 3Platform Architecture and System Design

Which characteristic best distinguishes a microservices architecture from a modular monolith on the same platform?

  1. Each module is compiled into one deployable artifact
  2. Each service is independently deployable and owns its data store Correct answer.
  3. Each service must be written in a different language
  4. Each module must share a single relational schema

Explanation

Independent deployability and per-service data ownership are the defining traits of microservices. Shared schemas and single artifacts describe monoliths, and language diversity is optional rather than required.

Question 4Platform Architecture and System Design

An architect proposes synchronous REST calls between five services to complete a single checkout flow. What is the primary architectural risk of this design?

  1. Inability to apply authentication at the edge
  2. Loss of the ability to version individual APIs
  3. Cascading latency and failure amplification across the call chain Correct answer.
  4. Excessive eventual consistency between services

Explanation

Chained synchronous calls multiply latency and propagate failures, so one slow or unavailable dependency degrades the whole flow. Asynchronous messaging or circuit breakers mitigate this risk.

Question 5Platform Architecture and System Design

Which consistency model does a platform typically adopt when it uses the saga pattern to coordinate a multi-service order workflow?

  1. Read-your-writes consistency across all services
  2. Eventual consistency with compensating transactions Correct answer.
  3. Serializable isolation across service databases
  4. Strict two-phase commit across all services

Explanation

Sagas achieve consistency by executing local transactions and compensating on failure, which yields eventual consistency rather than global atomicity. Two-phase commit across services is what sagas are designed to avoid.

Question 6Platform Architecture and System Design

What is the main purpose of an outbox table in a service that publishes domain events?

  1. To atomically persist state changes and pending events in one local transaction Correct answer.
  2. To deduplicate events received from upstream producers
  3. To cache events for faster replay to consumers
  4. To encrypt event payloads before publication

Explanation

The transactional outbox writes the state change and the event record in the same local transaction, then a relay publishes events, preventing lost or phantom events. This solves the dual-write problem without distributed transactions.

Question 7Platform Architecture and System Design

A platform exposes a public API where clients must not be able to infer the existence of resources they cannot access. Which authorization behavior supports this?

  1. Returning 500 for unauthorized resources to hide details
  2. Returning 403 for unauthorized and 404 for missing resources
  3. Returning 404 for both missing and unauthorized resources Correct answer.
  4. Returning 401 for unauthorized and 200 for missing resources

Explanation

Returning 404 for both cases prevents resource enumeration by masking whether an object exists. Distinct 403 and 404 responses reveal existence to unauthorized callers.

Question 8Platform Architecture and System Design

Which pattern allows a platform to evolve an API without breaking existing consumers by running old and new versions side by side?

  1. Removing fields from the response payload
  2. Forcing all consumers to upgrade in one release
  3. API versioning with parallel deployment of versions Correct answer.
  4. Deprecating the endpoint immediately

Explanation

Running versions in parallel gives consumers time to migrate while the platform maintains backward compatibility. Immediate deprecation or forced upgrades break existing integrations.

Question 9Platform Architecture and System Design

In a CQRS architecture, why are read models often denormalized separately from the write model?

  1. To guarantee strong consistency on all reads
  2. To eliminate the need for event sourcing
  3. To optimize query performance independently of write-side invariants Correct answer.
  4. To reduce the number of databases in the platform

Explanation

CQRS separates reads and writes so each side can be modeled and scaled for its own needs; read models are shaped for query performance. Invariants remain on the write side, and reads are typically eventually consistent.

Question 10Platform Architecture and System Design

Which mechanism best protects a platform against a single failing downstream dependency exhausting all request-handling threads?

  1. Circuit breaker with bounded timeouts Correct answer.
  2. Removing all timeouts to allow slow responses
  3. Retrying immediately in a tight loop
  4. Increasing thread pool size without limits

Explanation

A circuit breaker stops calls to a failing dependency and bounded timeouts release threads quickly, containing the blast radius. Unbounded pools and tight retry loops worsen resource exhaustion.

Question 11Platform Architecture and System Design

What does the bulkhead pattern achieve in a platform architecture?

  1. It encrypts traffic between services
  2. It centralizes all configuration in one store
  3. It isolates resource pools so failure in one workload cannot starve others Correct answer.
  4. It guarantees exactly-once message delivery

Explanation

Bulkheads partition resources such as thread pools or connection pools per workload, so a failure or surge in one area does not consume shared capacity. This limits fault propagation across the platform.

Question 12Platform Architecture and System Design

A platform must support tenants with strict data-residency requirements in multiple regions. Which architecture best satisfies this constraint?

  1. Regional data partitions with tenant routing at the edge Correct answer.
  2. A single global database with cross-region replication
  3. Client-side caching of all tenant data globally
  4. One shared schema for all tenants in one region

Explanation

Keeping tenant data in regional partitions and routing requests at the edge keeps data within required jurisdictions. A single global store with replication can place data outside permitted regions.

Question 13Platform Architecture and System Design

Which tenancy model gives each tenant a dedicated database while sharing application compute?

  1. Schema-per-tenant with shared compute
  2. Shared database with row-level tenant keys
  3. Single shared database with tenant column filters
  4. Database-per-tenant with pooled application tier Correct answer.

Explanation

Database-per-tenant isolates storage per tenant while the application tier remains pooled across tenants. The other options share a database or schema and provide weaker storage isolation.

Question 14Platform Architecture and System Design

Why does a platform use idempotency keys on a payment creation endpoint?

  1. To encrypt the payment payload in transit
  2. To enforce rate limits per client
  3. To speed up database index lookups
  4. To ensure retried requests create at most one payment Correct answer.

Explanation

Idempotency keys let the server recognize retries of the same logical request and return the original result instead of creating duplicates. This protects against network retries and client timeouts.

Question 15Platform Architecture and System Design

In an event-driven platform, what problem does a schema registry primarily solve?

  1. Encrypting events at rest
  2. Storing the event payloads permanently
  3. Enforcing compatible event schemas between producers and consumers Correct answer.
  4. Routing events to the correct consumer group

Explanation

A schema registry stores versioned schemas and enforces compatibility rules so producers cannot publish breaking changes that break consumers. It does not store payloads or handle routing.

Question 16Platform Architecture and System Design

Which approach best reduces coupling between a platform's domain logic and a third-party identity provider?

  1. Calling the provider SDK directly from every service
  2. Hard-coding the provider's endpoint in business rules
  3. Defining an internal identity port and adapting the provider behind it Correct answer.
  4. Embedding provider-specific tokens in domain entities

Explanation

An internal port with an adapter isolates the domain from provider-specific APIs, so providers can be replaced with limited impact. Direct SDK calls and embedded tokens spread vendor coupling across the codebase.

Question 17Platform Architecture and System Design

What is the primary benefit of a service mesh in a platform architecture?

  1. Offloading mTLS, retries, and telemetry to sidecar proxies Correct answer.
  2. Providing a shared relational database for services
  3. Eliminating the need for API versioning
  4. Replacing the need for domain-driven design

Explanation

A service mesh moves cross-cutting network concerns such as mutual TLS, retries, and telemetry into sidecars, keeping application code focused on business logic. It does not replace domain modeling or data design.

Question 18Platform Architecture and System Design

A platform team wants to test a new recommendation service with 5 percent of production traffic while keeping rollback instant. Which deployment strategy fits best?

  1. Recreate deployment with downtime
  2. Canary release with traffic splitting Correct answer.
  3. Blue-green deployment with full cutover
  4. Rolling deployment across all instances

Explanation

Canary releases route a small, controllable share of traffic to the new version and allow instant rollback if metrics degrade. Blue-green switches all traffic at once, and recreate causes downtime.

Question 19Platform Architecture and System Design

Which signal is most appropriate as the primary trigger for autoscaling a stateless API tier?

  1. Count of registered tenant accounts
  2. Request concurrency or queue depth per instance Correct answer.
  3. Total disk usage of the database
  4. Number of deployed code branches

Explanation

Scaling signals should reflect the load the tier actually serves, such as concurrency or queue depth. Database disk usage and account counts do not track request pressure on the API tier.

Question 20Platform Architecture and System Design

Why should a platform avoid storing session state in the local memory of a single application instance?

  1. It disables database connection pooling
  2. It makes TLS termination impossible
  3. It prevents the use of load balancers
  4. It prevents horizontal scaling and breaks on instance failure Correct answer.

Explanation

Instance-local state ties a user to one node, blocking horizontal scale-out and losing sessions on failure. Externalizing sessions to a shared store keeps the tier stateless.

Question 21Platform Architecture and System Design

A platform caches tenant-specific responses at a shared CDN edge. Which design element is essential to prevent cross-tenant data leakage?

  1. Including the tenant identity in the cache key Correct answer.
  2. Serving the same cached object to all tenants
  3. Increasing the cache TTL to reduce origin load
  4. Disabling cache invalidation for simplicity

Explanation

If tenant identity is part of the cache key, each tenant's response is cached separately and cannot be served to another tenant. Serving a shared object across tenants is precisely the leakage scenario.

Question 22Platform Architecture and System Design

Which statement best describes the role of an anti-corruption layer between a legacy system and a new platform domain?

  1. It encrypts traffic between the two systems
  2. It translates legacy models into domain concepts to protect the new model Correct answer.
  3. It guarantees strong consistency across both systems
  4. It replaces the legacy system with a new database

Explanation

An anti-corruption layer isolates the new domain from the legacy model by translating between them, preventing legacy concepts from leaking into the new design. It is a modeling boundary, not a security or consistency mechanism.

Question 23Platform Architecture and System Design

A platform must process a burst of 1 million background jobs with variable completion times. Which architecture is most appropriate?

  1. A single-threaded scheduled cron job
  2. A synchronous request handler per job
  3. Direct in-memory processing on the web tier
  4. A durable queue with horizontally scaled worker pools Correct answer.

Explanation

A durable queue decouples job submission from processing and allows workers to scale horizontally and retry failures. Synchronous handling and single-threaded cron cannot absorb the burst reliably.

Question 24Platform Architecture and System Design

What is the key architectural trade-off when a platform adopts event sourcing for its core aggregate?

  1. Lower storage cost in exchange for losing history
  2. Stronger encryption in exchange for slower queries
  3. Simpler schema in exchange for weaker security
  4. Full audit history and replay in exchange for higher storage and projection complexity Correct answer.

Explanation

Event sourcing retains every state change for audit and replay, but it increases storage growth and requires projections and snapshots to serve queries efficiently. It does not reduce storage or simplify security.

Question 25Platform Architecture and System Design

Which practice most directly supports zero-downtime database schema migrations on a high-traffic platform?

  1. Locking the table for the duration of the migration
  2. Running destructive column drops in the same release as code changes
  3. Applying backward-compatible expand-and-contract migrations Correct answer.
  4. Deploying schema changes manually during peak hours

Explanation

Expand-and-contract migrations add compatible structures first, migrate data, then remove old structures after code no longer uses them, keeping old and new code working during rollout. Destructive changes in the same release break running instances.

Question 26Platform Architecture and System Design

A platform team is documenting the responsibilities of the layers in a hexagonal (ports and adapters) architecture. Which responsibility belongs to the domain core?

  1. Serializing domain objects into rows of a relational schema
  2. Publishing metrics and traces for every outbound network call
  3. Enforcing business invariants and use-case orchestration independent of transport and storage Correct answer.
  4. Translating inbound HTTP requests into internal calls and mapping status codes

Explanation

In ports and adapters, the domain core holds business rules and use-case orchestration and depends only on abstract ports, never on concrete technologies. HTTP translation, persistence mapping, and observability instrumentation are adapter concerns that plug into the core from outside.

Question 27Platform Architecture and System Design

A platform exposes several capabilities that must be composed into a single client-facing operation, and the team wants the composition to be explicit, versioned, and independently deployable. Which architectural element fits best?

  1. A shared database that all capability services read and write directly
  2. A backend-for-frontend or orchestration layer that calls capability APIs and owns the composed contract Correct answer.
  3. A message broker topic where capability services publish results for consumers to correlate
  4. A client-side library that each consumer embeds to call the capability services itself

Explanation

An orchestration layer such as a backend-for-frontend centralizes composition, owns a versioned contract for consumers, and can be deployed independently of the capability services. It keeps capability services focused while giving the platform one place to evolve the composed interface.

Question 28Platform Architecture and System Design

A platform must guarantee that a workflow spanning several services either completes every step or leaves no partially applied effects visible. Which design most directly provides this guarantee?

  1. Retrying each step until it succeeds and accepting intermediate states in the meantime
  2. An event bus that delivers every step's event at least once to all subscribers
  3. A saga that pairs each step with a compensating action and persists saga state for recovery Correct answer.
  4. Wrapping all service calls in one long-running distributed transaction held open across network hops

Explanation

A saga models a multi-service workflow as a sequence of local transactions, each with a compensating action, and persists its state so recovery can resume or roll back after failures. Holding a single distributed transaction across network hops is not viable at platform scale, and at-least-once delivery alone does not remove partial effects.

Question 29Platform Architecture and System Design

A platform's public API returns collections that can contain millions of records. Which pagination design keeps response latency bounded and remains stable while records are inserted?

  1. Cursor (keyset) pagination over an indexed, strictly ordered key Correct answer.
  2. Random sampling of records on each request
  3. Returning the full collection and letting clients page locally
  4. Offset-based pagination with a large default page size

Explanation

Keyset pagination seeks directly to a position using an indexed ordered key, so cost per page stays roughly constant and inserts do not shift later pages. Offset pagination degrades on deep pages and can skip or repeat records when the underlying data changes.

Question 30Platform Architecture and System Design

A platform's audit log must let investigators prove that no entry was altered or deleted after being written. Which design provides the strongest evidence?

  1. Compressing entries and archiving them to cold object storage nightly
  2. Writing entries to a log file on each application host
  3. Chaining entries by hash and periodically anchoring the chain head in write-once storage Correct answer.
  4. Storing entries in a table that only administrators can update

Explanation

Hash chaining makes any modification detectable because each entry commits to its predecessor, and anchoring the chain head in write-once storage prevents undetected truncation or rewriting. Access controls and archives protect availability but do not by themselves prove integrity.

Question 31Platform Architecture and System Design

A platform team is choosing how services should discover each other in a dynamic environment where instances scale up and down frequently. Which approach keeps callers from depending on fixed addresses?

  1. A static load balancer whose backend list is edited by hand during each deployment
  2. Service discovery through a registry or platform DNS that resolves healthy instances Correct answer.
  3. Hard-coding instance IP addresses in each service's configuration file
  4. Publishing instance addresses on a shared wiki page for teams to copy

Explanation

Registry-based or platform-DNS discovery lets callers resolve a stable name to currently healthy instances, so scaling and replacement happen without caller changes. Fixed addresses and manual lists reintroduce the coupling that discovery is meant to remove.

Question 32Platform Architecture and System Design

A platform must let internal teams add new capabilities as plugins without modifying the core runtime. Which design best supports this requirement?

  1. Exposing the core's internal data structures directly so plugins can mutate them
  2. A single monolithic codebase where each team appends code to a shared module
  3. Forking the core runtime for each team's capability
  4. A stable extension contract with a registry that loads implementations discovered at startup Correct answer.

Explanation

A published extension contract plus a registry lets the core discover and load implementations while remaining unchanged, which is the essence of an extensible platform. Direct access to internals or forking creates coupling that defeats the goal of independent extension.

Question 33Platform Architecture and System Design

A platform team is defining service-level objectives for an API. Which formulation is a valid SLO?

  1. Latency must never exceed 300 ms at any instant
  2. The platform team will respond to incidents within 15 minutes
  3. The API should generally feel fast for most users
  4. 99.9 percent of successful read requests complete within 300 ms measured over a rolling 28-day window Correct answer.

Explanation

An SLO states a measurable target for a service-level indicator over a defined window, such as a latency percentile across a rolling period. Vague quality goals, absolute never-exceed claims, and response-time commitments describe other things entirely.

Question 34Platform Architecture and System Design

A platform stores tenant configuration in a cache that is read on every request. After an administrator changes a tenant's settings, other instances keep serving the old values for several minutes. Which change most directly fixes this?

  1. Increasing the cache entry time-to-live so entries are refreshed more often
  2. Moving the configuration into the application's local memory per instance
  3. Adding more cache replicas to spread read load
  4. Publishing a configuration-change event that instances subscribe to for targeted invalidation Correct answer.

Explanation

Event-driven invalidation notifies every instance that holds a copy so the stale entry is removed as soon as the change commits, rather than waiting for expiry. Shorter TTLs only shrink the staleness window, and local memory makes the divergence worse.

Question 35Platform Architecture and System Design

A platform runs a read-heavy catalog service. The team considers adding a read-through cache in front of the datastore. Which consequence should the architecture review flag as the main new risk?

  1. Consumers may observe stale catalog data after updates until the cache entry is invalidated or expires Correct answer.
  2. The datastore will be forced to serve every read twice to verify cache correctness
  3. Schema changes to the catalog table will no longer be possible
  4. Write throughput to the datastore will increase because every write now also populates the cache

Explanation

A cache introduces a second copy of the data, so reads can return values that lag behind the source until invalidation or expiry occurs. This staleness window, not write amplification or schema lock-in, is the trade-off the review must accept or mitigate.

Question 36Platform Architecture and System Design

A platform team wants to compare two candidate designs for a new capability before committing to build. Which artifact is most appropriate for capturing the decision and its rationale for future maintainers?

  1. A ticket in the backlog marked as done after the meeting
  2. An architecture decision record that states the context, the options considered, the decision, and its consequences Correct answer.
  3. A comment thread in the team chat channel where the debate happened
  4. A slide deck presented once at the design review meeting

Explanation

An architecture decision record is a lightweight, versioned document that preserves context, alternatives, the chosen option, and consequences alongside the codebase. It gives future maintainers the reasoning that meeting artifacts and chat threads fail to keep discoverable.

Question 37Application Development and Programming

アプリケーション開発において、SQLインジェクションを防ぐ最も確実な方法はどれか。

  1. 入力値からシングルクォートを除去する
  2. データベース接続ユーザーに全権限を付与する
  3. プレースホルダを用いたパラメータ化クエリを使用する Correct answer.
  4. エラーメッセージを非表示にする

Explanation

パラメータ化クエリはSQL文の構造とデータを分離するため、入力値がSQL構文として解釈されず、インジェクションを根本的に防げる。文字除去やエラー非表示は回避策にすぎず、バイパス可能である。

Question 38Application Development and Programming

REST APIの設計原則として適切なものはどれか。

  1. セッション状態をサーバー側で必ず保持する
  2. GETリクエストでリソースの状態を変更する
  3. リソースはURIで識別し、操作はHTTPメソッドで表現する Correct answer.
  4. すべての操作をPOSTのみで行う

Explanation

RESTではリソースをURIで一意に識別し、取得・作成・更新・削除をHTTPメソッドの意味論に対応させる。ステートレス性も基本原則であり、サーバー側でのセッション保持に依存しない設計が推奨される。

Question 39Application Development and Programming

JavaのHashMapについて正しい記述はどれか。

  1. スレッドセーフであり並行更新に安全である
  2. キーの挿入順序が保証される
  3. キーの重複を許可する
  4. nullキーを1つ格納できる Correct answer.

Explanation

HashMapはnullキーを1つ、null値を複数格納できる。順序は保証せず、スレッドセーフでもないため並行処理にはConcurrentHashMapなどを用いる。

Question 40Application Development and Programming

Gitにおいて、作業中の変更を一時退避して別ブランチへ切り替えたい場合に使うコマンドはどれか。

  1. git tag
  2. git stash Correct answer.
  3. git rebase
  4. git merge

Explanation

git stashはコミットしていない作業ツリーの変更を一時的に退避し、クリーンな状態でブランチ操作を行える。後でgit stash popにより変更を復元できる。

Question 41Application Development and Programming

Pythonのリスト内包表記 [x*2 for x in range(3)] の評価結果はどれか。

  1. [0, 1, 2]
  2. [0, 2, 4] Correct answer.
  3. [2, 4, 6]
  4. [1, 2, 3]

Explanation

range(3)は0,1,2を生成し、それぞれを2倍した[0,2,4]が得られる。リスト内包表記は各要素に式を適用した新しいリストを返す。

Question 42Application Development and Programming

HTTPステータスコード401と403の違いとして正しいものはどれか。

  1. 401は権限不足、403は未認証を表す
  2. 401はサーバーエラー、403はリダイレクトを表す
  3. 401と403は同一の意味を持つ
  4. 401は未認証、403は認証済みだが権限不足を表す Correct answer.

Explanation

401 Unauthorizedは認証情報が無いか無効であることを示し、403 Forbiddenは認証はされているがアクセス権限が無いことを示す。両者は認証と認可という異なる段階の失敗を表す。

Question 43Application Development and Programming

ユニットテストの目的として最も適切なものはどれか。

  1. 本番環境での障害対応手順を検証する
  2. システム全体の負荷耐性を測定する
  3. 個々の関数やクラスが仕様どおり動作することを検証する Correct answer.
  4. エンドツーエンドの業務シナリオを検証する

Explanation

ユニットテストは最小単位の関数やメソッドを対象に、入力と出力が仕様に合致するかを高速かつ繰り返し検証する。負荷試験やE2Eテストとは対象範囲が異なる。

Question 44Application Development and Programming

変数名や関数名の付け方として、可読性を高める観点で最も適切なものはどれか。

  1. 型ごとにa1, a2, a3のような連番を付ける
  2. 短さを優先し1文字の名前を多用する
  3. コメントで補う前提で無意味な名前を付ける
  4. 意味を表す具体的な名前を付け、略語の多用を避ける Correct answer.

Explanation

識別子は役割や意図を表す具体的な名前にすることで、コードを読むだけで処理内容を把握できる。連番や1文字名は意味が伝わらず保守性を下げる。

Question 45Application Development and Programming

データベースのトランザクション分離レベル「READ COMMITTED」で発生し得る現象はどれか。

  1. ファントムリードのみ発生しない
  2. ダーティリード
  3. ノンリピータブルリード Correct answer.
  4. いかなる並行異常も発生しない

Explanation

READ COMMITTEDではコミット済みデータのみ読むためダーティリードは防げるが、同一トランザクション内で再読すると値が変わり得るノンリピータブルリードは発生する。ファントムリードも発生し得る。

Question 46Application Development and Programming

マイクロサービス間の通信で、一時的な障害に対して再試行を実装する際に推奨される設計はどれか。

  1. 再試行のたびにタイムアウトを延ばさず固定間隔で無限に行う
  2. 指数バックオフとジッターを組み合わせ、上限回数を設ける Correct answer.
  3. 無条件に即時無限再試行する
  4. 再試行せず常にエラーを返す

Explanation

指数バックオフにジッターを加えることで、多数のクライアントが同時に再試行して障害を悪化させるサンダリングハードを緩和できる。上限回数を設けることで無限ループを防ぐ。

Question 47Application Development and Programming

OAuth 2.0の認可コードフローにおいて、認可コードをアクセストークンと交換する際にクライアント認証が重要な理由はどれか。

  1. リフレッシュトークンを不要にするため
  2. 認可コードを横取りした第三者がトークンを取得するのを防ぐため Correct answer.
  3. スコープを自動的に拡大するため
  4. アクセストークンの有効期限を延ばすため

Explanation

認可コードはフロントチャネルを通るため漏えいし得る。トークン交換時にクライアント認証とPKCEを組み合わせることで、コードを入手した攻撃者がトークンへ交換することを防ぐ。

Question 48Application Development and Programming

JavaScriptのPromiseにおいて、複数の非同期処理のうち最初に成功したものの結果を得たい場合に使うメソッドはどれか。

  1. Promise.race Correct answer.
  2. Promise.allSettled
  3. Promise.resolve
  4. Promise.all

Explanation

Promise.raceは渡した複数のPromiseのうち最初にsettleしたものの結果(成功または失敗)で確定する。最初の成功結果を得たい場合はraceを利用する。

Question 49Application Development and Programming

コンテナイメージのビルドにおいて、マルチステージビルドを用いる主な利点はどれか。

  1. ビルドツールを含めず実行に必要な成果物のみを最終イメージに含められる Correct answer.
  2. イメージのレイヤー数が常に1になる
  3. 実行時にソースコードのコンパイルが可能になる
  4. イメージのビルド時間が必ずゼロになる

Explanation

マルチステージビルドではビルド用ステージと実行用ステージを分け、最終イメージには実行に必要な成果物のみをコピーできる。これによりイメージサイズと攻撃面を削減できる。

Question 50Application Development and Programming

RDBにおいて、頻繁に検索条件に使われる列にインデックスを追加する際の注意点として正しいものはどれか。

  1. WHERE句の条件に関係なく常に検索が高速化する
  2. インデックスはディスク容量を消費しない
  3. INSERTやUPDATEのコストが増加し得る Correct answer.
  4. 書き込み性能が向上する

Explanation

インデックスは検索を高速化する一方、データ変更時にインデックスの更新が必要なため書き込みコストが増える。またストレージも消費するため、利用状況を踏まえて設計する。