- Learn
- Computer Science & IT
- Information Technology
- Cloud Architecture and Administration
- Cloud Storage and Database Design
Cloud Storage and Database Design
IntermediateLesson 4 of 8 in Cloud Architecture and Administration Course
What you will learn
- Match object, block and file storage options to how often data is read, how fast it must come back and how long it is kept, then automate moves and deletions with lifecycle rules.
- Match object storage classes to access patternsCompare frequent-access, infrequent-access and archive classes by storage price, retrieval fees, retrieval time, minimum storage duration and resilience, and pick a class for each data set.
- Automate tier changes and deletion with lifecycle rulesWrite lifecycle rules that move objects to cheaper classes and delete them on schedule, including old versions and incomplete uploads, within the providers' timing limits.
- Size block and file storage for performanceChoose block volume types and file service tiers from the required IOPS, throughput, latency and sharing, and check by calculation whether a configuration meets the workload.
- Match object storage classes to access patterns
- Protect buckets and storage accounts with identity, resource and network rules and encryption, and share single objects safely with time-limited signed URLs and shared access signatures.
- Lock down buckets and storage accountsCombine identity policies, resource policies, public-access blocks, network rules and encryption keys so that each user and application reaches only the data it needs.
- Share objects with signed URLs and shared access signaturesCreate time-limited links for downloads and uploads, choose the right signature type for each provider, and plan how to limit and revoke them.
- Lock down buckets and storage accounts
- Decide how many copies of data to keep and where, tell durability from availability, and set up replication of objects across zones, regions and accounts.
- Choose a redundancy level for stored dataCompare redundancy within a datacenter, across zones and across regions, with synchronous or asynchronous copies, and match the choice to recovery targets and data residency.
- Replicate objects across buckets, accounts and regionsConfigure object replication rules with the versioning they require, know what is and is not copied and how fast, and protect against changes that replication would spread.
- Choose a redundancy level for stored data
- Select relational, NoSQL and in-memory services from a workload's data model, access patterns, consistency, scale and availability needs, and configure them for performance.
- Select and configure a managed relational databaseCompare managed relational services and deployment models, size compute and storage, keep the database available within a region and manage connections.
- Choose a NoSQL data model and serviceMatch key-value, document, wide-column and graph databases to access patterns, design partition keys, and plan capacity, consistency and multi-region use.
- Speed up reads with cachingPlace an in-memory cache in front of a database, choose a caching strategy, expiry and eviction policy and an engine, and estimate the effect on load and latency.
- Select and configure a managed relational database
- Scale out reads with replicas and scale out data and writes with partitioning, and manage the consistency and operational trade-offs each brings.
- Scale reads with read replicasAdd read replicas, route traffic to them, size them, handle replication lag, and tell them apart from high-availability standbys.
- Partition data with shardingSplit data across servers or partitions with a shard key, choose a sharding scheme, and plan for hot spots, cross-shard queries and resharding.
- Scale reads with read replicas
- Move files, objects and databases into and between clouds with a suitable transfer method, a calculated schedule and a tested cutover.
- Choose a method to move files and objectsCompare online transfer tools, hybrid gateways, dedicated links and offline devices, calculate transfer times, and plan a copy-sync-cutover migration.
- Migrate databases with minimal downtimeChoose a homogeneous or heterogeneous path, convert schemas, combine a full load with change data capture, and validate, cut over and plan a rollback.
- Choose a method to move files and objects
Cloud Storage and Database Design study guide
1Choose storage classes and automate their lifecycle
Storage choices affect both the monthly bill and the time a user waits for data. Match object classes to access and retention, turn that plan into lifecycle rules, and size disks and shared file systems from their actual I/O patterns. The useful comparison includes retrieval fees, object overhead, and the virtual machine limits along the storage path. A cheap capacity setting alone cannot show whether the workload will run well.
1.1 Object classes, access costs, and retrieval time
A storage class changes what you pay to keep and read each object. Azure calls it an access tier. Start with the workload: read frequency, response time, retention period, and object size. A low monthly storage price can be outweighed by retrieval and request charges.
Compare access and retention
| Access need | AWS | Azure | Google Cloud |
|---|---|---|---|
| Frequent reads | S3 Standard | Hot | Standard |
| Rare reads, immediate access | Standard-IA, One Zone-IA | Cool, Cold | Nearline, Coldline |
| Archive | Glacier Instant, Flexible, Deep Archive | Archive | Archive |
Standard-IA, One Zone-IA, Cool, and Nearline have 30-day minimum storage durations. Cold and Coldline use 90 days; so do Glacier Instant and Flexible Retrieval. Deep Archive and Azure Archive use 180 days, and Google Archive uses 365 days.
Archive does not always mean offline. Glacier Instant Retrieval and all Google Cloud Storage classes give millisecond access. Glacier Flexible Retrieval requires restoration: expedited takes about 1–5 minutes, standard 3–5 hours, and bulk 5–12 hours. Deep Archive standard restores take up to about 12 hours; bulk can take 48 hours. Azure Archive must be rehydrated to an online tier, taking up to 15 hours at standard priority. A record needed during an interactive support call cannot depend on an hours-long restore.
Work out the bill
With illustrative prices, 10,000 GB at $0.023 per GB-month costs $230. At $0.0125 per GB-month, storage costs $125. If 500 GB is retrieved at $0.01 per GB, retrieval adds $5, giving $130. Reading the entire data set adds $100, giving $225 before request fees. At these prices, reading about 105% of the stored volume per month erases the saving.
A minimum duration is a billing commitment, not a deletion lock. Deleting a blob after 60 days in Azure Cold leaves 30 days of charges. Deleting after 45 days in a 180-day archive leaves 135 days. Early overwrites and class changes can also trigger charges on S3 and Azure. Google lifecycle SetStorageClass moves have no early deletion fee, and time already stored counts toward the new class's minimum: 20 days in Nearline plus 60 in Coldline leaves 10 days against Coldline's 90-day minimum.
Object count matters. Standard-IA, One Zone-IA, and Glacier Instant Retrieval bill objects as at least 128 KB. Flexible Retrieval and Deep Archive add about 40 KB of metadata per object, including 8 KB charged at Standard rates. Bundling tiny logs into daily archives can reduce this overhead, although reading one log then means retrieving its bundle.
Handle uncertain access and zone loss
S3 Intelligent-Tiering moves eligible objects after 30 days without access to Infrequent Access, then after 90 days to Archive Instant Access, and moves them back when read. It has a monitoring fee and no retrieval fees; objects under 128 KB stay in the frequent tier without monitoring. Google Autoclass and Azure smart tier also automate tier selection.
Single-zone options suit replaceable data. One Zone-IA can hold regenerated thumbnails; Express One Zone offers consistent single-digit-millisecond access for demanding workloads. Neither protects against losing its zone. Keep the only copy of important records in a class whose failure coverage meets the workload.
Key Takeaways
- Compare storage, retrieval, and request charges.
- Check whether archive reads need a restore first.
- Minimum duration controls billing; it does not prevent deletion.
- Small-object overhead can erase cold-storage savings.
- Single-zone classes suit data that can be re-created.
- Automatic tiering helps when access patterns change.
1.2 Lifecycle filters, timing, and old versions
A lifecycle rule selects objects and schedules a move or deletion. It keeps data handling consistent as a bucket grows. The rule needs a filter, a condition, and an action: for example, objects under logs/, older than 90 days, move to an archive class.
Turn retention into a rule
- Group data by access pattern and required retention.
- Select a narrow prefix, tag, or size range for each group.
- Place transitions in order from warmer to colder storage.
- Set expiration to match how long the data must remain.
- Check time spent in each class and the size of each object.
- Try the rule on a sample prefix and review the resulting actions and charges.
Application logs read often for a week, occasionally for a month, and retained for a year can move to infrequent access at day 30, archive at day 90, and expire at day 365. Azure uses actions such as tierToCool, tierToArchive, and delete; an age condition can use daysAfterModificationGreaterThan. Keep the age basis visible when comparing policies: days since creation and days since last modification can select different objects.
Check the time inside each class
S3 lifecycle follows a waterfall toward colder classes. It cannot return archived objects to Standard; restore and copy them. Azure lifecycle also cannot rehydrate Archive blobs; use Copy Blob or Set Blob Tier.
S3 allows lifecycle transitions into Standard-IA and One Zone-IA from day 0. Their 30-day minimum storage charge still applies. For multiple transitions in one rule, respect a class's minimum residence period: a move into Glacier Instant Retrieval at day 30 requires a later move to Deep Archive no earlier than day 120. That is 90 days after entering the class, not 90 days after creation.
S3 excludes objects under 128 KB from lifecycle transitions by default. A size filter can override that behavior, but per-object transition fees may cost more than the storage saved.
Clean up the data that ordinary expiration leaves
In a versioned S3 bucket, deleting the current object adds a delete marker. Older versions still occupy storage. Set separate noncurrent-version actions, such as NoncurrentVersionExpiration 30 days after a version becomes noncurrent. That clock starts when another version replaces it. Remove expired delete markers once they no longer hide retained versions. Azure lifecycle rules also have version actions.
An incomplete multipart upload is another source of hidden storage. Its uploaded parts remain billable until the upload completes or is aborted. An AbortIncompleteMultipartUpload rule after 7 days cleans up abandoned work without expiring completed objects.
Use access conditions carefully
Azure can move a blob after 30 days without a read when last-access tracking is enabled. daysAfterLastAccessTimeGreaterThan supplies the condition; enableAutoTierToHotFromCool can return a Cool blob to Hot when read. Google lifecycle combines conditions such as age, current class, and newer-version count with SetStorageClass or Delete.
Lifecycle work is asynchronous. Evaluation is roughly daily, actions can follow later, and Azure policy changes can take up to 24 hours to take effect. A scheduled expiration does not enforce a minimum retention date against manual deletion. Object lock or an immutability policy provides that protection.
Key Takeaways
- Select objects narrowly before scheduling actions.
- Measure class residence from the transition date.
- Current objects, noncurrent versions, and unfinished uploads need separate handling.
- Lifecycle actions are asynchronous.
- Use immutability controls to enforce retention.
1.3 Disk performance and shared file systems
Choose the storage interface before sizing its performance. A virtual machine uses block storage as a disk; several clients mount a shared file system over NFS or SMB. An object API reads and writes objects over HTTPS and does not provide ordinary in-place disk updates.
Translate workload into disk limits
IOPS means input/output operations per second. Throughput measures data moved per second, and latency measures the time one operation takes. Small random database operations often reach the IOPS limit first. Large sequential reads can reach throughput limits with relatively few operations.
At 3,000 IOPS and 16 KiB per operation, throughput is 48,000 KiB/s, about 46.9 MiB/s. At 256 KiB per operation, a 125 MiB/s limit supports only 500 IOPS. Binary conversion uses 1,024 KiB per MiB; network transfer calculations use decimal units when stated that way.
A database requiring 12,000 IOPS at 16 KiB needs 187.5 MiB/s. Provisioning 12,000 IOPS but leaving a 125 MiB/s limit would fail the throughput requirement. A 200 MiB/s setting clears that calculation.
Match the volume to the access pattern
| Volume option | Main use |
|---|---|
| EBS gp3 | General-purpose SSD; IOPS and throughput can be raised independently of capacity |
| EBS io2 Block Express | Demanding databases needing consistent, very low latency |
| EBS st1 | Large sequential, throughput-heavy HDD workloads |
| EBS sc1 | Infrequently read sequential HDD data |
The gp3 baseline is 3,000 IOPS and 125 MiB/s. It supports up to 80,000 IOPS and 2,000 MiB/s, with at most 500 IOPS per GiB. Thus 12,000 IOPS requires at least 24 GiB, as well as enough capacity for the data itself. Increasing a gp3 volume's size alone is not the way to buy extra IOPS. The st1 and sc1 HDD options cannot be boot volumes. Azure offers Standard HDD, Standard SSD, Premium SSD, Premium SSD v2, and Ultra Disk for different performance needs.
Check the entire path
The VM has its own aggregate disk IOPS and throughput limits. A disk provisioned for 200 MiB/s still delivers no more than the VM can carry. Compare workload demand with both limits, then measure latency under realistic load. Striping several disks with RAID 0 can add performance, but any member's failure threatens the striped data.
Ordinary block volumes are attached to one VM at a time. Shared disks and EBS Multi-Attach are exceptions that require a cluster-aware file system; attaching a normal file system to several writers is unsafe.
Supply files to many clients
Amazon EFS provides elastic NFS storage, including a multi-zone option, with Standard, Infrequent Access, and Archive classes and Elastic throughput. Azure Files offers SMB and NFS shares on standard HDD or premium SSD storage. Google Filestore provides managed NFS. FSx supplies Windows File Server, Lustre for high-performance computing, NetApp ONTAP, and OpenZFS systems.
For a fleet of servers editing the same directory tree, choose a shared file service with the required protocol and throughput. For one database VM's data files, choose block storage and size it using that database's I/O pattern.
Key Takeaways
- Check IOPS, throughput, and latency separately.
- Use actual operation size to calculate throughput.
- A VM limit can hold back a fast disk.
- gp3 performance can be provisioned independently of capacity.
- Use a shared file service for ordinary multi-client file access.
2Control access to stored data
Access depends on who is asking, what action they need, which resource they reach, and how the request arrives. Combine identity and storage policies with private network paths and encryption-key controls. Then delegate short-lived access with a signed URL or SAS when a recipient has no cloud identity. The design needs a revocation path as well as a way to issue the link, because anyone who obtains that bearer link can use its authority.
2.1 Permissions, private paths, and encryption keys
Storage security combines identity, resource rules, network access, and encryption. Each layer answers a different question. A private route determines how a request arrives; permissions determine what it may do; encryption controls how stored bytes and keys are protected.
Give each identity only the access it needs
Least privilege means limiting actions and resources together. A reporting process may need s3:GetObject under finance/ without upload or delete rights. Management-plane permission to configure a storage account is separate from data-plane permission to read its contents.
S3 evaluates IAM identity policies, bucket policies, Block Public Access, and other applicable controls together. Requests begin denied. An explicit Deny overrides an Allow. Within one account, an applicable identity or bucket Allow can grant access when no control denies it. Cross-account access requires permission from both the requesting account's identity policy and the resource's bucket policy.
A bucket Allow for finance/* does not remove a role's broader IAM Allow. Remove that broader grant or add an appropriate explicit Deny to enforce the boundary. By contrast, a Deny when aws:SecureTransport is false forces HTTPS, including for otherwise authorized users. A Deny tied to aws:SourceVpce can require requests through a chosen VPC endpoint.
Keep public-access protection enabled. New S3 buckets block public access and disable ACLs with bucket-owner-enforced ownership. New Azure accounts disallow anonymous blob access by default. A CDN with controlled origin access can deliver public assets while the bucket stays private.
Prefer roles over account secrets
On Azure, use Microsoft Entra ID and data roles such as Storage Blob Data Reader at the smallest useful scope. A container-level assignment is narrower than an account-level one. Account access keys grant broad access; store them in Key Vault and rotate one at a time. Move applications to key 2, regenerate key 1, migrate back, then regenerate key 2. Disable Shared Key authorization when applications no longer require it.
Azure Files over SMB combines share-level Azure RBAC with Windows file and folder ACLs. Both layers must allow the operation. Supported identity paths include Active Directory Domain Services, Microsoft Entra Domain Services, and Microsoft Entra Kerberos.
Separate network reachability from authorization
An Azure firewall with default Deny admits selected networks, IP ranges, and configured service exceptions. A service endpoint uses the Azure backbone but still addresses the storage account's public endpoint. A private endpoint supplies a private IP in the virtual network, allowing public network access to be turned off. S3 VPC endpoints provide a private route on AWS. Correct routing does not replace data permissions.
Control and audit keys
S3 encrypts new objects with SSE-S3 by default; Azure uses Microsoft-managed keys. Customer-managed keys in AWS KMS, Azure Key Vault, or Google Cloud give the organization control over key permissions and rotation. Disabling a key can cut off decryption, with timing affected by service key caching.
With S3 Bucket Keys, later object requests can reuse a bucket-level key without another KMS request or key-policy evaluation. KMS logs then identify the bucket. Use storage access logs for individual data requests. Encryption at rest does not block a reader whom the storage policies authorize.
Key Takeaways
- An explicit Deny overrides an Allow.
- A narrow Allow does not cancel a broader grant.
- Assign data-plane roles at the smallest useful scope.
- Private networking and identity permissions are separate controls.
- Rotate account keys one at a time.
- Audit object requests with storage access logs.
2.2 Short-lived links and how to revoke them
A signed URL delegates one storage operation for a limited time. The recipient does not need a cloud identity. The link contains the resource address plus signed parameters, so anyone holding it can use its authority. Treat it as a bearer token.
Delegate one operation
For a browser upload, first authenticate the user in the application. The backend checks that user's right to upload, chooses one object key, and issues a short-lived signed PUT URL. The browser uploads directly to storage. Afterwards, validate the uploaded file: permission to upload says nothing about its contents.
S3 presigned URLs inherit the signing principal's permissions. With Signature Version 4 and long-term IAM user credentials, they can last up to 7 days; the console offers 1 minute to 12 hours. Temporary credentials impose an earlier ceiling: when the signing role session expires, its URL fails even if the requested URL expiry is later. A valid signature also does not bypass an explicit bucket Deny or network restriction.
Choose an Azure SAS type
| SAS type | Signed with | Typical scope |
|---|---|---|
| User delegation | A delegation key obtained through Entra ID | Delegated resource access without an account key |
| Service | An account access key | Resources in one storage service |
| Account | An account access key | One or more services and service-level operations |
Microsoft recommends user delegation SAS. Its authority is bounded by the signer's permissions, and its lifetime is at most 7 days. For any SAS, restrict permissions, resource, and time together. sp=r grants read, st and se set times, spr=https requires HTTPS, sip can restrict client IPs, and sig carries the signature. A link for one document should not grant write and delete on its container.
Plan revocation before sharing
A service SAS associated with a stored access policy can be revoked by changing or deleting the policy. A container holds up to five stored access policies. Account SAS and user delegation SAS do not support this mechanism.
An ad hoc service or account SAS has no individual server-side policy to remove. Regenerating its signing account key invalidates it and all applications or SAS tokens using that key. Disabling Shared Key access blocks key-signed blob access. For a user delegation SAS, revoke delegation keys or remove the signer's relevant role; permission changes can take time to propagate. Short expiry keeps exposure small while revocation takes effect.
Read expiry as a request boundary
Google Cloud Storage V4 signed URLs also allow at most 7 days. A link issued at 14:00 with a 900-second lifetime expires at 14:15. S3 checks expiry when a request starts: a download begun at 14:14 can finish, but a fresh retry at 14:16 fails. Do not interpret expiry as a command to interrupt a response already in progress.
Use roles for ongoing staff and application access. Use storage signed URLs for temporary direct sharing, and CDN signed URLs or cookies for protected delivery through a CDN. Keep signing credentials on the backend and send bearer links only over HTTPS; forwarding the link forwards its access.
Key Takeaways
- Signed URLs are bearer tokens.
- A link cannot outlive temporary credentials that signed it.
- Prefer user delegation SAS when it meets the sharing need.
- Stored access policies revoke associated service SAS tokens.
- Key rotation can revoke many clients at once.
- S3 checks expiry when a request begins.
3Design redundancy and replication for stored data
Copies protect against different failures depending on where they live and how writes reach them. Choose the zones and regions that match residency and recovery needs, then separate account redundancy from selected-object replication. The important questions are what a successful write confirms, how far a distant copy can lag, and which harmful changes reach every copy. Version protection and deliberate deletion behavior address risks that geography alone leaves open.
3.1 Failure coverage and recovery targets
A storage design must say which failures it survives and how quickly users regain service. Durability concerns stored data remaining intact over a year. Availability concerns whether reads and writes work when needed. Durable data can still be unreachable during an outage.
Match copies to the failure
Copies within a datacenter protect against device, server, and rack failures. Copies across zones also protect against losing a zone. Copies across regions protect against a regional disaster, but the distant copy commonly lags. Specify data residency before choosing where that copy may live.
| Azure option | Primary protection | Secondary region |
|---|---|---|
| LRS | Copies in one datacenter | None |
| ZRS | Synchronous copies across at least three zones | None |
| GRS | LRS primary | Asynchronous, LRS secondary |
| GZRS | ZRS primary | Asynchronous, LRS secondary |
| RA-GRS / RA-GZRS | As above | Secondary also readable before failover |
Azure's durability design figures are at least 11 nines for LRS, 12 for ZRS, and 16 for geo-redundant options. These are durability figures, not the percentage of time an application is online. The -secondary endpoint lets applications read an RA secondary, which may contain older data.
S3 Standard, Standard-IA, Intelligent-Tiering, and Glacier classes store across at least three zones. One Zone-IA and Express One Zone use one zone. Cross-region copies need replication. Google buckets can be regional, dual-region, or multi-region; dual-region turbo replication targets new-object copying within 15 minutes.
Understand what a successful write confirms
Synchronous replication waits for the required copies before acknowledging success. Some systems require all available copies; others require a majority quorum. It adds waiting time to each write, so it is commonly used within a region. Asynchronous replication acknowledges first and copies later, allowing lower write latency across distance but leaving recent writes exposed if the source is lost.
RPO, the recovery point objective, is the largest acceptable data-loss interval. RTO, the recovery time objective, is the longest acceptable service interruption. A 10-minute RPO does not mean a 10-minute recovery: detection, decision, DNS changes, and application recovery all consume time. Azure geo priority replication targets an RPO of 15 minutes or less for block blobs.
With GRS or GZRS, the secondary takes writes only after account failover. Failover changes DNS so the existing endpoint names lead to the new primary. Writes not copied before the outage can be lost.
Make a constrained choice
Regenerable thumbnails can use LRS or One Zone-IA. Customer documents that must remain in one region and survive a zone outage fit ZRS or S3 Standard without cross-region replication. Records that must survive regional loss and remain readable fit RA-GZRS, or S3 with an accessible cross-region replica. Azure Archive supports LRS, GRS, and RA-GRS; it does not combine with every redundancy choice.
Redundancy copies apply harmful changes too. Versioning, soft delete, object lock, immutability, and separate backups protect against different forms of deletion or corruption. A wider geographic spread does not recover yesterday's content after today's bad overwrite.
Key Takeaways
- Durability and availability measure different outcomes.
- Choose the failure scope before selecting redundancy.
- Synchronous acknowledgments wait for required copies.
- RPO limits data loss; RTO limits interruption.
- Read-access geo options expose the secondary before failover.
- Redundancy does not preserve a history of good data.
3.2 Object replication rules and version protection
Object replication creates an asynchronous copy in another bucket or account. It can place data near users, separate administrative control, or maintain a regional recovery copy. Unlike account redundancy, it lets you select particular objects and a destination.
Prepare S3 replication
Cross-Region Replication, or CRR, crosses regions. Same-Region Replication, or SRR, can separate accounts without moving data out of the region. Enable versioning on both buckets. Give S3 an IAM role that can read the source and write the destination; a destination in another account also needs a bucket policy allowing that access. Replicating KMS-encrypted data requires the corresponding key permissions. A source using Object Lock requires Object Lock at the destination.
A live replication rule handles new eligible objects. Use S3 Batch Replication for objects that already existed before the rule. An object received as a replica is not automatically copied onward by another live rule. Plan each required destination instead of assuming a chain.
Delete markers replicate only when enabled; permanently deleting a particular version does not replicate. Lifecycle actions also do not replicate. A source expiration and a destination expiration therefore need separate policies.
Allow for lag and cost
Ordinary replication often finishes in minutes, but a large object can take hours. S3 Replication Time Control, a paid option, is designed to replicate 99.99% of new objects within 15 minutes and supplies delay metrics and notifications. It is not a guarantee that every object arrives by that instant. Azure object priority replication targets 99.0% within 15 minutes when both accounts are on the same continent.
Budget for destination storage, replication requests, and cross-region transfer. For 2 TB of new product originals each month, a second-region copy adds about 2 TB of cross-region traffic before counting retries or other activity.
Configure Azure object replication
Azure replicates block blobs between accounts. Enable blob versioning on both accounts and the change feed on the source. A policy can contain up to 1,000 container-pair rules with optional prefix filters. New blobs are included by default; explicitly include existing blobs when needed. Archive-tier blobs are not replicated, and the destination container rejects writes while replication is active.
GRS and GZRS copy an account to its paired region. Object replication uses a separate destination account and selected containers or prefixes. That difference matters when an organization needs a chosen region or separate administrative ownership.
Retain useful versions
An overwrite creates a new version while versioning retains the previous content. Azure blob and container soft delete can retain deleted data for 1–365 days; Azure Files also supports soft delete and share snapshots. Retained versions cost storage, so expire old versions on a deliberate schedule.
For a product-image design, replicate originals/ to a separate-account bucket in a second region. Keep delete marker replication off if production deletes should not hide the destination copy. Set its own lifecycle rule to expire noncurrent versions after 90 days. Restrict the source administrators' rights at the destination: a separate account helps only when its permissions maintain that separation.
Key Takeaways
- Enable required versioning and replication permissions before copying.
- Existing objects need explicit inclusion or batch replication.
- Decide deletion behavior separately from new-object copying.
- Lifecycle rules are local to each bucket.
- Monitor lag and budget for each replica.
- Retain old versions deliberately, with a lifecycle cost plan.
4Choose managed database services for each workload
A database service should match the application's queries, transactions, freshness needs, and load. Compare managed SQL engines with keyed and document-oriented services, then consider which repeated reads belong in a cache. Capacity choices include compute, storage, connections, and request units. Managed operation removes server work, while the team still designs queries, keys, permissions, and the rules that keep cached results current.
4.1 SQL engines, capacity, and availability
A managed relational database supplies a SQL engine while the provider operates the underlying service. It suits related tables, joins, and ACID transactions. The application team still owns schema design, queries, indexes, users, permissions, and capacity choices.
Start from compatibility
| Provider | Managed choices and their roles |
|---|---|
| AWS | RDS runs engines including PostgreSQL, MySQL, MariaDB, Oracle, SQL Server, and Db2; Aurora is MySQL- or PostgreSQL-compatible with distributed storage |
| Azure | SQL Database serves single databases or elastic pools; SQL Managed Instance supports SQL Server lift-and-shift; flexible servers run PostgreSQL or MySQL |
| Google Cloud | Cloud SQL runs familiar SQL engines; AlloyDB is PostgreSQL-compatible; Spanner supplies horizontally scalable, distributed relational storage |
Check drivers, stored procedures, extensions, licensing, and team skills. SQL Server to PostgreSQL changes engines and requires schema and code conversion. A database on a VM gives operating-system control and responsibility for patching and operation; choose that control when the workload needs it.
Size the resource that is busy
Choose CPU and memory from measured workload demand, then storage capacity and IOPS. RDS uses instance classes; Azure SQL can use vCores or the older DTU bundle of compute and I/O. Storage autoscaling grows capacity when free space runs low; it does not repair an inefficient query. Inspect slow queries and missing indexes before buying more compute.
Variable workloads can use Aurora Serverless v2 or Azure SQL Database serverless. Azure SQL serverless can pause when idle. Many small databases whose peaks occur at different times can share an elastic pool. If 20 databases each peak at 4 vCores but together never exceed 16, a 16-vCore pool can serve that combined demand instead of allocating 80 vCores as independent peaks. The overlap between peaks is the important input.
Separate standby capacity from read capacity
An RDS Multi-AZ DB instance has a synchronous standby in another zone and automatic failover, typically within 60–120 seconds. Its standby does not serve application reads. An RDS Multi-AZ DB cluster has two readable standbys. Aurora stores six data copies across three zones and can promote a reader if the writer fails. Azure SQL offers zone-redundant configurations, and Cloud SQL HA uses a second-zone standby.
These options reduce infrastructure interruption; the application still needs connection recovery. Use the service endpoint name so the service can move the database behind it. Handle transient errors with retries appropriate to the transaction.
Keep connections within capacity
Each open connection consumes database memory. A burst of application workers can exhaust connections even when individual queries are short. A connection proxy such as RDS Proxy pools and reuses connections and can reduce disruption during failover.
For an intermittently busy API, examine CPU, memory, storage latency, query execution, and connection count separately. Serverless compute addresses changing compute demand. A proxy addresses connection storms. Better indexes address avoidable query work. Their effects are different, so select the change that matches the measured bottleneck.
Key Takeaways
- Choose an engine from compatibility and workload needs.
- Managed operation leaves queries and permissions with your team.
- Pool databases when their combined peak is smaller than separate peaks.
- A Multi-AZ instance standby does not serve reads.
- Use endpoints, retries, and connection pooling for connection resilience.
4.2 NoSQL models, keys, capacity, and consistency
NoSQL services use nonrelational data models. They often spread data across machines and answer known queries quickly. A document store can allow different fields in each document; a Cassandra-style wide-column service still declares tables and column types.
Choose the model from the queries
| Model | Useful access pattern | Examples |
|---|---|---|
| Key-value | Get a cart by customer key | DynamoDB, Redis |
| Document | Read a nested JSON record | Cosmos DB for NoSQL, DocumentDB, Firestore |
| Wide-column | Read large keyed ranges | Bigtable, Keyspaces |
| Graph | Traverse relationships | Neptune, Cosmos DB for Gremlin |
Start by listing requests such as "Get a customer's orders, newest first." A DynamoDB partition key of customer ID plus an order-time sort key supports this query. A global secondary index, or GSI, can support a different lookup. Ad hoc joins across many entities usually fit a relational engine better. NoSQL services can still offer transactions within their documented limits.
Spread traffic as well as data
A good partition key has many values with reasonably balanced traffic. A status field with three values concentrates requests. One very busy customer can also overload a partition even when the table has many customers. Automatic partition splitting does not make every logical key evenly busy.
A DynamoDB partition supports about 3,000 RCU and 1,000 WCU per second. Table-wide spare capacity cannot rescue a request concentrated beyond a partition's capacity. Prefer high-cardinality keys used in the main queries; avoid full scans as the normal lookup path.
Calculate capacity with size rounding
One RCU supports one strongly consistent read per second of an item up to 4 KB, or two eventually consistent reads. One WCU supports one write per second up to 1 KB. Round each item's size up before multiplying by requests. Transactions cost twice the ordinary units, and an item can be at most 400 KB.
For 500 strongly consistent reads per second of 6 KB items, each read needs two units, giving 1,000 RCU. Eventual reads need 500 RCU. For 200 writes per second of 2.5 KB items, each write needs three units, giving 600 WCU. Provisioned mode suits planned steady demand, with auto scaling available. On-demand mode bills requests and handles unpredictable demand without choosing provisioned throughput.
Cosmos DB uses request units per second. A point read of a 1 KB item by ID and partition key costs 1 RU with session, consistent-prefix, or eventual consistency; strong and bounded-staleness reads cost twice as much.
Select freshness and indexes together
Strong reads return the latest committed write; eventual reads may be older. DynamoDB defaults to eventual reads. Cosmos DB offers strong, bounded staleness, session, consistent prefix, and eventual consistency. Session consistency lets a client read its own writes within its session.
A DynamoDB GSI has its own keys and capacity and updates asynchronously, so its reads are eventual. A local secondary index shares the table's partition key, must be created with the table, and can serve strong reads. Index writes cost capacity when an indexed or projected entry changes; an update to an attribute absent from the index does not change that index.
DynamoDB global tables and Cosmos DB multi-region writes support local writes in multiple regions. Most configurations replicate asynchronously and resolve conflicts, commonly using last writer wins. A local success therefore need not be visible immediately in another region.
Key Takeaways
- Design keys from access patterns.
- Balance traffic across key values, not just row counts.
- Round item sizes before calculating RCU and WCU.
- Strong and eventual reads have different freshness and cost.
- A GSI is asynchronous and cannot serve strongly consistent reads.
- Indexes add cost when their entries change.
- Multi-region writes require a consistency and conflict plan.
4.3 Cache strategies and their effect on database load
A cache holds frequently used data in memory. It can reduce database reads and response time, but the application must decide how entries stay fresh and what happens when the cache is unavailable. Cache only data whose reads repeat often enough to justify the extra component.
Follow a read through cache-aside
With cache-aside, the application checks the cache first. A hit returns the stored value. On a miss, the application reads the database, fills the cache, and returns the value. Only requested data is cached, but the first read is slower. A cache outage can fall back to database reads when the application supports that path and the database can carry the load.
| Write strategy | Sequence | Main cost or risk |
|---|---|---|
| Write-through | Write the database and update the cache as part of the write path | Extra write latency; unused entries may fill memory |
| Write-behind | Acknowledge a cache write, persist to the database later | A cache failure can lose unpersisted writes |
For authoritative payment decisions, read current database state or use a carefully invalidated path. A cache copy should not silently become the only record of important data.
Estimate load and latency
Suppose an application receives 10,000 reads per second. Cache lookup takes 1 ms and a database query takes 20 ms. At a 90% hit ratio, 1,000 reads per second reach the database. Hits take 1 ms, while misses take 21 ms because they include both operations.
At 95% hits, database load falls to 500 reads per second and average latency to 2.0 ms. This simple average treats the stated operation times as fixed; measure real latency distributions and the miss path under load.
Expire and invalidate entries
A time to live, or TTL, sets how long a cached value remains eligible to be served. A 60-second TTL for product data limits its cache lifetime, while a slowly changing reference list can use a longer one. Delete or update the cached key when its source changes if stale results are unacceptable.
Add small random variation, called jitter, to TTLs so many entries do not expire together. Otherwise a popular batch can send a burst of misses to the database. When memory fills, an eviction policy chooses entries to remove. Least recently used, or LRU, favors items accessed recently. Rising evictions combined with falling hit ratio can show that the active working set no longer fits.
Choose the cache service and engine
Amazon ElastiCache supports Valkey, Redis OSS, and Memcached. Azure Managed Redis replaces Azure Cache for Redis; Google Memorystore offers managed cache engines. DAX caches DynamoDB requests. Memcached is a simple multithreaded key-value cache without replication or persistence. Redis and Valkey add data structures, replication, failover, optional persistence, and clustering, making them useful for session stores, rate limits, and leaderboards.
A CDN caches files near users. A read replica holds a full database copy and executes queries. An in-memory cache holds selected values; these layers reduce different kinds of repeated work.
Key Takeaways
- Cache-aside fills entries on demand.
- Include the cache lookup in miss latency.
- Write-behind risks losing writes not yet persisted.
- Use TTLs and write-driven invalidation to manage freshness.
- TTL jitter spreads bursts of expiry.
- Size memory for the working set and watch evictions.
5Scale databases for growing reads and data
Growing reads and growing writes create different scaling problems. Use replicas to move eligible reads away from the writer, allowing for lag and the loss of a reader. Use sharding when data and write load must span servers, choosing keys that keep common operations local. Each design needs a routing plan: where a request goes, how it finds its data, and what happens when capacity changes. More nodes only help when they relieve the measured bottleneck.
5.1 Read routing, replica sizing, and promotion
A read replica is a database copy used to serve reads away from the writer. It reduces read load on the primary and can isolate long reports. It does not divide the stream of application writes: the primary still accepts those writes and replicas must apply them.
Route by freshness need
Use the writer endpoint for writes and reads that must see current state. Send lag-tolerant searches, reports, and dashboards to readers. An application that writes a profile and immediately reads a lagging replica may display the old profile. Keep that session on the writer briefly after a write, or wait for the required replica position.
Replication lag measures how far a reader trails the writer. Monitor lag alongside CPU, connections, and query load. A small replica can be overwhelmed by applying the primary's changes even if it serves few application queries.
Calculate enough capacity
A service receives 2,000 queries per second, 80% of them reads. That gives 1,600 reads and 400 writes per second. If one replica handles 600 reads per second, two provide only 1,200; three provide 1,800 and meet normal demand. A fourth keeps enough capacity when one reader fails. The writer still needs capacity for all 400 writes, plus any reads routed there for freshness.
Measure per-replica capacity with realistic queries. A figure from small indexed lookups does not describe a reporting workload that scans large tables. The sizing calculation is useful only when its throughput input matches the intended traffic.
Know the service's routing behavior
RDS offers read replicas in the same or another region for several SQL engines. Applications use separate reader and writer connection strings or a driver or proxy that splits requests. Ordinary RDS read replicas are planned and adjusted explicitly; RDS does not add them automatically.
Aurora supports up to 15 readers sharing the cluster storage. Its reader endpoint distributes connections, and Aurora Auto Scaling can change reader count using demand metrics. Azure SQL provides read scale-out in Premium, Business Critical, and Hyperscale tiers; active geo-replication supports up to four readable geo-secondaries. Cloud SQL also provides read replicas.
Distinguish failover from independent promotion
An RDS Multi-AZ DB instance standby is synchronous, automatic-failover capacity and serves no reads. Its role differs from an asynchronous read replica. A Multi-AZ DB cluster has readable standbys, so include the deployment type when discussing these features.
Promoting an ordinary RDS read replica makes it a standalone writable database and ends replication from the old primary. If a cross-region reader is promoted during an outage, writes still in transit can be lost. An Aurora failover changes a reader into the writer inside the same cluster and retains the cluster's other readers.
A replica that may take over should have enough compute for the writer's workload. Use endpoint names instead of fixed IP addresses so routing can follow service changes. Adding more readers is useful when reads are the bottleneck; slow writes call for query, resource, or data-distribution changes.
Key Takeaways
- Route current-state reads to the writer.
- Round replica count up and plan failure headroom.
- Read replicas do not add application write capacity.
- Monitor lag, especially on smaller readers.
- RDS promotion ends the old replication relationship.
5.2 Shard keys, hot spots, and adding capacity
Sharding splits data across database servers so storage and writes can grow beyond one server. It also changes routing, queries, and operations. Tune queries, consider caching and replicas, and use available vertical capacity before taking on that complexity.
Pick a key that matches the work
A shard key determines where each row lives. It should have many values, distribute traffic, and appear in frequent queries. Tenant ID often keeps a tenant's records and transactions together. However, one very large tenant may still dominate one shard. Count requests per key as well as rows per key.
Vertical scaling moves to a larger instance and has a ceiling. Horizontal partitioning divides rows; it becomes sharding when those parts are placed on separate servers. Monthly table partitions within one PostgreSQL server can improve pruning and make old data easy to drop, but they do not add another server's CPU or storage bandwidth.
Compare three routing schemes
| Scheme | How placement works | Main trade-off |
|---|---|---|
| Range | Key intervals map to shards | Efficient range reads; new sequential keys can crowd the last shard |
| Hash | A hash of the key determines the shard | Even distribution across keys; range queries scatter |
| Directory | A lookup table maps a key to its shard | Flexible placement; the directory must stay fast and available |
Range-sharding on an increasing timestamp puts all new writes in the newest range. Hashing timestamps can distribute writes, but a time-range query then needs several shards. Choose using the dominant requests, not just a desire for even disk usage.
Plan for the next shard
Simple modulo routing computes the hash modulo the shard count. Changing from four shards to five changes the mapping for about 80% of keys. Moving that much data while writes continue is a substantial migration.
Consistent hashing places keys and shards on a ring. Adding a similarly weighted fifth shard moves roughly one fifth of keys instead. Many virtual positions per shard help balance placement. The exact moved fraction depends on the layout; the method reduces redistribution instead of promising no movement.
Keep operations local when possible
A request without the shard key may need scatter-gather: ask every shard and merge results. Cross-shard joins and transactions can be slower or unsupported. Independent auto-increment counters can also produce duplicate identifiers, so use a global identifier scheme such as UUIDs when records must be unique across shards.
A hot logical key can be split with a calculated or random suffix, called write sharding. That spreads writes but means reads may need to fetch and combine several suffixes. Caching can help a read-heavy hot key; it does not distribute a heavy stream of new writes.
Understand the managed boundary
DynamoDB and Cosmos DB automatically manage physical partitions, but designers still choose logical partition keys. Spanner splits ranges automatically. Aurora Limitless Database distributes Aurora PostgreSQL data, and Azure Database for PostgreSQL elastic clusters use a distribution column through Citus. Managed movement reduces operational work; queries still pay for poor locality and uneven keys.
Key Takeaways
- Shard keys must spread load and support common queries.
- Range and hash placement trade range locality for distribution.
- Modulo resharding can move most keys.
- Consistent hashing reduces movement when adding shards.
- Cross-shard queries and transactions add work.
- One-server table partitions do not add server capacity.
6Plan and carry out data migrations
Migration planning connects transfer capacity with the moment applications change where they read and write. Estimate file-copy time from sustained bandwidth, choose online or offline tools, and keep a live source synchronized until the final switch. Database moves add schema compatibility and transaction-log changes. Validation and rollback depend on a clear write boundary, especially after the target begins accepting changes that the old source has never seen.
6.1 Transfer schedules and file-share cutover
Choose a transfer method from volume, file count, change rate, bandwidth, and the time available. The size alone is not enough: millions of small files can take much longer than a few large objects holding the same number of bytes.
Estimate using effective bandwidth
Use decimal KB, MB, GB, and TB for these examples. Multiply bytes by 8 to get bits. An 80 TB copy contains 640,000 gigabits. At 80% of a 1 Gbps link, divide by 0.8 Gbps to get 800,000 seconds, about 9.3 days. A 500 TB copy takes about 58 days on that path. Plan for the sustained rate after competing traffic, not the link's nameplate speed.
Select a tool and transport
AWS DataSync provides scheduled transfers from file systems and object stores to S3, EFS, or FSx, with encryption, integrity checks, and bandwidth limits. AzCopy provides command-line transfer to and between Azure Blob Storage and Azure Files; Storage Explorer supplies a graphical interface. Google Storage Transfer Service moves data from other clouds, URL lists, and on-premises file systems into Cloud Storage.
For an AWS folder copy, aws s3 sync ./data s3://example-archive/data sends new or changed content. On Windows Command Prompt, an Azure upload can use:
azcopy copy "C:\data" "https://myaccount.blob.core.windows.net/archive?<SAS>" --recursive
Use a real authorized destination and SAS at execution time, or authenticate with Entra ID through azcopy login. A later azcopy sync can transfer changes before cutover.
A private dedicated connection—Direct Connect, ExpressRoute, or Cloud Interconnect—provides predictable capacity for repeated large moves, but installation can take weeks. A site-to-site VPN is quicker to arrange and encrypted over the internet, with less predictable throughput.
When an online transfer takes too long, compare an offline device's full shipping-and-ingestion schedule. Azure Data Box and Google Transfer Appliance carry locally copied data to the provider. Snowball Edge is restricted to existing AWS customers; new AWS customers can use DataSync, Data Transfer Terminal, or partner paths. Data Transfer Terminal means bringing your storage to an AWS transfer location.
Move a live file share without splitting writes
- Inventory size, file count, permissions, and daily changes.
- Prepare destination access, encryption, and lifecycle settings.
- Run a full first copy while users keep working.
- Repeat incremental syncs to reduce the remaining changes.
- Freeze source writes, perform the final sync, and verify counts and checksums.
- Switch users and applications, keeping the old location read-only while checking the new one.
A source left writable after cutover creates two diverging locations. A one-time copy also misses changes made while the copy was running.
For gradual hybrid use, S3 File Gateway exposes an NFS or SMB share backed by S3 with a local cache. Storage Gateway also has Volume and Tape Gateway modes. Azure File Sync caches Azure file shares on Windows servers and tiers rarely used files to the cloud. These maintain a working hybrid access path beyond the initial bulk move.
Key Takeaways
- Convert bytes to bits before dividing by network rate.
- Measure sustained bandwidth and file count.
- Compare online time with the complete offline schedule.
- Use repeated syncs followed by a write freeze and verification.
- Keep the old source read-only after cutover.
6.2 Full load, change capture, and a safe switch
A database migration moves both data and the behavior applications depend on. Keeping the engine makes the move homogeneous; changing engines makes it heterogeneous. SQL Server to PostgreSQL requires testing converted types, queries, procedures, and triggers as well as copied rows.
Choose how the copy stays current
A dump-and-restore path using tools such as pg_dump, pg_restore, or mysqldump is straightforward for an offline move. In that pattern, writes remain stopped during the copy and restore. Native replication can keep a same-engine target current. Managed migration services on AWS, Azure, and Google support full loads and ongoing changes for supported engine combinations.
For minimal downtime, create the target schema, copy existing rows with a full load, and capture new committed changes from the source transaction log. Change data capture, or CDC, applies those changes to the target. The bulk copy can then run while the application stays online; downtime is reserved for the final write freeze and switch.
Prepare schema and secondary objects
AWS DMS Schema Conversion assesses and converts supported schema objects and reports manual work. For example, Oracle NUMBER needs a suitable PostgreSQL numeric type, while SQL Server identity generation needs a PostgreSQL identity configuration. Test application behavior after conversion; type names alone do not establish compatibility.
DMS primarily creates migration-required objects such as tables and primary keys. Supply secondary indexes, users, jobs, permissions, and other dependencies through conversion or scripts. For a full-load-plus-CDC task, create required secondary indexes after full load and before applying cached changes. Keep target triggers disabled while replicated changes arrive: source-trigger effects have already entered the change stream. Handle foreign keys according to the tested engine and task sequence; they can often be restored after cached changes are applied. Enable required target behavior before application writes begin.
Check the schedule and readiness
Moving 2 TB across a 1 Gbps link at 80% utilization takes 20,000 seconds, about 5.6 hours, even before engine processing. A shop allowing under 15 minutes of interruption cannot stop writes for that entire load. Use full load plus CDC, then measure whether the apply rate keeps up with new changes. A growing lag cannot be repaired merely by waiting for a calendar cutover time.
Compare row counts, checksums, and representative queries. Run application tests, verify logins and jobs, and test performance at realistic load. Equal row counts alone can hide incorrect values or broken procedures.
Control the write boundary
Freeze schema changes, prepare endpoint updates, lower DNS TTLs in advance when DNS is part of the switch, and name the go/no-go owner. Stop source writes, wait for final changes to apply, verify the target, and switch applications. Record which system may accept writes at each stage.
An unchanged source is a rollback path only until the target accepts new writes. Afterwards it is missing those writes. Switching back safely needs tested reverse replication or reconciliation, or an explicit decision to accept the loss. Keeping the source online by itself does not make rollback lossless.
Key Takeaways
- Same-engine and changed-engine migrations need different conversion work.
- Full load plus CDC moves most work outside the outage.
- Create secondary objects in the tested migration sequence.
- Validate values, application behavior, and realistic performance.
- Drain final changes after freezing source writes.
- Rollback after target writes needs a way to carry them back.
Cloud Storage and Database Design examples
1Choose storage for an image-processing service
14 steps
- 1IntroductionStart with three workload needs
An image-processing service stores originals for two years, retains temporary working images for 14 days, and uses a database disk for processing status. Originals are read occasionally but must open immediately. Temporary images can be regenerated.
These requirements lead to three decisions: choose an object class, automate the age-based handling, and calculate disk performance. Start with the response time and retention; the lowest storage rate is only one input.
- 2ExplanationCheck access before comparing prices
An infrequent-access class can suit originals that are rarely read but must open immediately. An archive class requiring hours of restoration cannot meet that response time.
Archive names alone do not decide the issue: Google Archive and Glacier Instant Retrieval remain online. Then compare minimum duration and per-read costs. The service keeps originals for two years, so their retention can accommodate a long minimum; a 14-day working image has a very different billing profile.
- 3ExampleCalculate the storage and retrieval parts
Suppose the originals occupy 2,000 GB. Illustrative monthly rates are $0.022/GB in a warm class or $0.013/GB in an online cool class, plus $0.01/GB retrieved. The service retrieves 100 GB monthly.
Warm storage is $44. Cool storage is $26 plus $1 retrieval, giving $27 before request and other fees. The $17 difference is useful only because both candidates meet the immediate-access requirement.
- 4ChallengeChoose for short-lived working images
A proposed cold class has a 90-day minimum. The service deletes its regenerable working images after 14 days. What billing issue must be included before choosing it?
---reveal---
Deletion would leave 76 days of minimum-duration charges. The data can be removed, but short retention does not cancel the billing commitment. A warmer class or a suitable short-lived single-zone option may fit better after the complete charges are compared.
- 5ExplanationKeep lifecycle groups separate
Use separate prefixes such as
originals/andworking/. A rule forworking/can expire its objects at day 14 without selecting originals needed for two years.Each rule combines a filter, a condition, and an action. Check whether its age means time since creation, modification, or last access. A broad bucket-wide expiration can be syntactically valid while selecting the wrong business records.
- 6ExampleMeasure time from the class entry
Consider eligible originals moved into Glacier Instant Retrieval at day 60, followed by Deep Archive later. That first class has a 90-day minimum residence for transitions within the same rule.
Add 90 to the entry day: the next move can be scheduled for day 150 or later. Scheduling it at object age 90 would provide only 30 days in the class. This residence calculation is separate from the decision to keep the object for two years.
- 7TipInclude storage beyond the current version
If versioning is enabled, a replacement keeps earlier content. A current-object expiration rule can leave those older bytes stored, so add a deliberate noncurrent-version schedule.
Also abort old incomplete multipart uploads. Their uploaded parts remain billable even when no completed image appears in the ordinary object list. These rules address different populations: current objects, earlier versions, and unfinished upload parts.
- 8ChallengeFind the earliest second move
A different prefix enters Glacier Instant Retrieval at day 75. What is the earliest Deep Archive age for a transition in that same rule, and can an expiry rule prevent a user from deleting the object early?
---reveal---
The next transition is day 165 or later, allowing 90 days in the first class. An expiry rule schedules cleanup but does not block early manual deletion. Object lock or an immutability policy enforces that retention boundary.
- 9ExplanationTranslate the database I/O pattern
The status database needs 8,000 disk operations per second, each 16 KiB. Multiply the operation count by the operation size before choosing throughput.
That is 128,000 KiB/s. Dividing by 1,024 gives 125 MiB/s. Provisioned IOPS and throughput must both meet the workload; having enough operations per second alone does not establish that the disk can move their combined data.
- 10ExampleCheck disk size and the VM path
At 500 IOPS per GiB, provisioning 8,000 gp3 IOPS requires at least 16 GiB, plus whatever capacity the actual database occupies. Its calculated throughput requirement is 125 MiB/s.
A VM capped at 100 MiB/s cannot carry that workload even with a suitable volume. Choose a VM storage path above the requirement and leave operational headroom in both settings. A larger volume behind the same VM cap does not remove that cap.
- 11ConnectionUse the interface the workers share
Several image workers also need a common directory of intermediate assets. A managed file service supplies NFS or SMB sharing with the required client permissions and throughput.
The database's ordinary block disk is not that shared directory. EFS, Azure Files, Filestore, and the appropriate FSx system provide file interfaces; object storage is useful for completed images accessed through object APIs. Choose each interface from how the application updates and shares its data.
- 12ChallengeRecheck a larger I/O size
The database later needs 8,000 operations/s at 32 KiB. Its disk and VM both allow 200 MiB/s. Is that throughput sufficient?
---reveal---
No. The new demand is 256,000 KiB/s, or 250 MiB/s. Both the disk and VM limits must cover that rate. The operation count stayed the same, but doubling operation size doubled throughput demand; increasing only the IOPS setting would not address the shortage.
- 13ChallengeCombine lifecycle with retrieval needs
An administrator proposes Deep Archive at day 150 for originals that still must open immediately for the whole two years. Does passing the 90-day residence check make the proposal suitable?
---reveal---
No. The timing can be valid while the retrieval behavior fails the application requirement. Keep those originals in an online class as long as immediate access is needed. A lifecycle transition must satisfy both class timing rules and the workload's continuing use.
- 14RecapReview the design in dependency order
Check response time and retention first. Compare the full object cost, then apply narrowly filtered lifecycle rules. For disks, calculate operations and bytes moved, check class-specific sizing, and check the VM path. For shared edits, select the needed file protocol.
2Give a contractor limited document access
11 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionDefine the contractor task
- 2ExplanationAssign data permissions at the right scope
- 3ExampleEvaluate an explicit transport Deny
- 4ConnectionKeep private routing distinct from authority
- 5ChallengeDiagnose a blocked read
- 6ExplanationIssue a one-object upload link
- 7ExampleApply the earlier expiry
- 8TipChoose a revocation boundary
- 9ChallengeRevoke a project group
- 10ChallengeCheck the whole upload route
- 11RecapTrace the request before sharing
3Keep documents available and copy selected originals
11 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionSeparate the two copy requirements
- 2ExplanationChoose the primary failure coverage
- 3Key InsightRead durability and availability separately
- 4ExampleTranslate recovery requirements
- 5ChallengeHandle a tighter residency rule
- 6ExplanationPrepare a separate-account S3 destination
- 7ExampleCopy old and new documents
- 8TipGive the destination its own retention
- 9ChallengeFind the missing Azure settings
- 10ChallengeTest regional copying against a bad overwrite
- 11RecapRecord what each copy provides
4Choose a data service for a booking platform
15 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionFollow three kinds of data
- 2ExplanationChoose SQL for related transactions
- 3ExamplePool capacity when peaks differ
- 4ChallengeFix the measured connection problem
- 5ExplanationDesign the event lookup first
- 6ExampleRound each event before multiplying
- 7ExampleChoose freshness at the access path
- 8ChallengeDiagnose a throttled event store
- 9ExplanationCache descriptions with cache-aside
- 10ExampleEstimate database reads after caching
- 11ExampleAverage the hit and miss paths
- 12TipAvoid synchronized expiry
- 13ChallengeCompare a risky write path
- 14ChallengeMatch the three access needs
- 15RecapDocument each service boundary
5Scale a growing tenant database
11 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionIdentify what is growing
- 2ExampleSeparate reads from writes
- 3ExampleAdd the failure case
- 4ExplanationKeep a recent writer on the primary
- 5ChallengeRecalculate with freshness routing
- 6ConnectionRecognize when readers stop helping
- 7ExplanationKeep tenant operations together
- 8ExampleCompare adding a fifth shard
- 9ChallengeHandle one very busy tenant
- 10ChallengeChoose the next change from the evidence
- 11RecapReview both capacity and routing
6Move a live file service and its database
13 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionSet the migration constraints
- 2ExampleConvert the file volume to bits
- 3ExplanationChoose the transfer path
- 4TipPrepare the destination before copying
- 5ChallengeStop files from diverging
- 6ExampleSee why an offline database copy is too long
- 7ExplanationPrepare behavior as well as tables
- 8ExampleCalculate whether CDC can catch up
- 9ChallengeDiagnose growing lag
- 10ExplanationValidate before opening target writes
- 11ChallengeCheck the rollback boundary
- 12ChallengeMake a combined go or no-go decision
- 13RecapRecord the handover evidence
Cloud Storage and Database Design practice questions
Set 1: Apply access, replication, and migration choices10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
reports/*. No Deny applies. What can the role still read?Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Storage and data design foundations10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Work through capacity and consistency trade-offs10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Resolve competing design requirements10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
vpce-7. A presigned read URL from the role is opened through the public internet. What permits a successful request under these controls?Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
raw/ objects across regions. Versioning and permissions on both sides are ready. The source also has a lifecycle rule. What completes the copying and retention design?Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 5: Integrate capacity, freshness, and cutover planning10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
Account failover
Account SAS
Asynchronous replication
Automatic tiering
Availability
B
Bearer token
Block storage
C
Cache-aside
Change data capture
Checksum
Connection proxy
Consistent hashing
Cross-Region Replication
Customer-managed key
Cutover
D
Data plane
Delete marker
Directory sharding
Durability
E
Effective bandwidth
Elastic pool
Eviction policy
Expiration
Explicit Deny
F
File storage
Full load
G
Global secondary index
H
Hash sharding
Heterogeneous migration
High-availability standby
Hit ratio
Homogeneous migration
Hot partition
Hybrid storage gateway
I
Identity-based policy
Incomplete multipart upload
Incremental sync
IOPS
L
Latency
Least privilege
Lifecycle filter
audit/ keeps an expiration rule from selecting active objects stored under another prefix.Lifecycle policy
M
Managed relational database
Minimum storage duration
N
Noncurrent version
NoSQL database
O
Offline transfer
P
Partition key
Private endpoint
Provisioned IOPS
R
Range sharding
Read capacity unit
Read replica
Reader endpoint
Recovery point objective
Recovery time objective
Rehydration
Replica promotion
Replication lag
Resource-based policy
Restoration
Retrieval fee
Rollback
S
S3 Batch Replication
Same-Region Replication
Serverless database compute
Service SAS
Shard key
Sharding
Signed URL
Single-zone storage
Soft delete
Sort key
Storage class
Stored access policy
Strong consistency
Synchronous replication
T
Throughput
Time to live
TTL jitter
U
User delegation SAS
V
Versioning
W
Write capacity unit
Write-behind
Write-through
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.