Practice
Solution
Step 1: Identify storage needs for unstructured data with metadata
Object storage stores data as objects with customizable metadata and supports HTTP APIs, ideal for images/videos.Step 2: Eliminate other storage types
Block storage is low-level and lacks metadata support; file storage is optimized for hierarchical file systems but less scalable for massive unstructured data; in-memory storage is volatile and unsuitable for large persistent files.Final Answer:
Option A -> Option AQuick Check:
Object storage = scalable unstructured data + metadata + HTTP [check]
Solution
Step 1: Understand sequence number role in Snowflake
The sequence number differentiates IDs generated within the same millisecond on the same machine.Step 2: Analyze overflow handling
If the sequence exceeds its max (e.g., 4095), the generator must wait for the next millisecond to avoid duplicates. Resetting immediately (A) risks duplicates; wrapping (C) causes collisions; incrementing machine ID (D) is not part of the design.Final Answer:
Option A -> Option AQuick Check:
Sequence overflow -> wait next millisecond to avoid duplicates [check]
Solution
Step 1: Analyze latency vs throughput needs
Batch processing adds latency but can increase throughput and tolerate some message loss.Step 2: Evaluate architectures
Synchronous (A) increases latency; asynchronous queue (B) reduces latency but may cause duplicates; distributed cache (D) lacks delivery guarantees; batch (C) balances throughput with acceptable latency for some use cases.Final Answer:
Option A -> Option AQuick Check:
Batching trades latency for throughput, tolerating some loss [check]
Solution
Step 1: Identify scaling impact on Bloom filter components
At very high scale, hash function computation cost increases linearly with insertions, becoming a CPU bottleneck.Step 2: Evaluate other components
Bit array saturation affects false positives but does not cause immediate failure; network and client latency scale better.Final Answer:
Option C -> Option CQuick Check:
Hash function CPU cost grows linearly, causing first failure at scale [check]
Solution
Step 1: Identify centralization bottleneck
The Ticket Server centrally allocates ID blocks and maintains allocation state, limiting horizontal scaling.Step 2: Compare other components
Clients scale horizontally; network scales with infrastructure; database load is less critical if Ticket Server caches state.Final Answer:
Option A -> Option AQuick Check:
Ticket Server centralization -> first bottleneck at 10x scale [check]
