Independent architecture study
Keeping checkout open during demand
Scalable E-Commerce Platform on AWS Lightsail
A busy storefront must keep taking orders while images, browsing and checkout compete for resources. This independent architecture study explores how WooCommerce can share a database across Lightsail instances, with cached content reducing pressure on the shop.
An independent architecture study based on public AWS guidance. A design exercise, not a client engagement.

- Workload
- WordPress and WooCommerce storefront
- Constraint
- Predictable infrastructure spend with limited operational capacity
- Approach
- Load-balanced instances, a shared HA database and separate media delivery
- <30 minFull platform restorationDesign target. A recovery objective from the study, requiring timed restore exercises rather than an availability guarantee.
- <24 hoursRecovery pointDesign target. The study targets this through daily backups; backup completion and restore checks must establish whether it is met.
What makes this difficult
Checkout cannot use yesterday’s answer
An image can be reused across shoppers, but a cart belongs to a session and must reach the application with its context intact.
Another server needs shared state
Adding an instance helps only when orders, media and application configuration remain consistent across the servers that could handle a request.
Capacity takes preparation
Lightsail has no native instance autoscaling, so promotional demand needs advance capacity planning and a rehearsed process for adding healthy servers.
Follow a shopping basket
Browsing and images use cached content where possible, while the basket travels to a healthy shop instance and the shared order database.
- 01
Reuse the public storefront
The shopper requests a public page through the distribution. An eligible cached response returns immediately, leaving application capacity available for requests that need fresh processing.
Illustrative example Illustrative example: a cacheable storefront page is returned.
- 02
Fetch images away from checkout
The browser requests product images through a separate media distribution backed by the bucket. Cache misses fetch shared media without asking a shop instance to serve files.
Illustrative example Illustrative example: the product image loads from the media delivery path.
- 03
Send the basket to the application
Cart and checkout requests bypass the page cache with their session context. The load balancer routes them to a healthy instance, which reads the shared database.
Illustrative example Illustrative example: the application retrieves the current basket and order details.
- 04
Process payment and record the outcome
WooCommerce communicates with the payment provider and records the order outcome in the shared database. The checkout response returns through the existing request path.
Illustrative example Illustrative example: payment status is recorded and an order confirmation is prepared.
- 05
Route around an unhealthy instance
When an instance fails its health checks, the load balancer excludes it. Another healthy instance handles subsequent requests using the same order database.
Illustrative example Illustrative example: new requests reach the remaining healthy shop instance.
- 06
Restore and rejoin the shop
An operator restores a replacement from a snapshot, verifies its shared configuration and registers it with the load balancer. Traffic resumes after health checks pass.
Illustrative example Illustrative example: a restored instance rejoins the serving pool.
- Request
- Data
- Later, queued
- Control
The hard part
Cache the picture, preserve the basket
The important boundary is between reusable content and customer state. Product images can be cached and fetched from shared object storage. Basket and checkout requests must retain session information and reach WooCommerce. This scene shows separate page and media distributions, avoiding an assumption that a Lightsail distribution can combine multiple origins.
Why this design
Use bundled infrastructure
- Chosen
- Run WooCommerce on Lightsail with managed load balancing and an HA database.
- Because
- The workload benefits from simpler infrastructure choices and a predictable baseline for a small operations team.
- Cost
- The team still owns WordPress maintenance, plugin compatibility and manual or scripted instance scaling.
- Reconsider when
- Move towards EC2 or containers when traffic changes demand automatic scaling or more detailed network control.
Share media outside the instances
- Chosen
- Offload images to a bucket and deliver them through a separate media distribution.
- Because
- Every serving instance needs the same media library without maintaining a separate local copy.
- Cost
- The offload plugin, media URLs and distribution configuration become additional operational dependencies.
- Reconsider when
- A single instance with a small catalogue may not justify this separation until availability or storage needs grow.
Keep checkout uncached
- Chosen
- Forward cart and checkout requests with the session information WooCommerce needs.
- Because
- A customer must receive their current basket and payment outcome rather than a reused page response.
- Cost
- Checkout traffic continues to consume application and database capacity even when image caching is effective.
- Reconsider when
- Revisit the application architecture when dynamic checkout demand consistently exceeds the capacity of the instance pool.
Cost and operating assumptions
Shop instances
Instance plans establish the compute baseline; spare capacity for failures and promotions adds to the monthly commitment.
Shared database
The HA database plan pays for a standby as well as the primary, with larger plans needed as database demand grows.
Content delivery
Page and media distributions, bucket storage and transfer beyond included allowances depend on traffic and image sizes.
Recovery copies
Retained snapshots and object versions accumulate storage charges, so retention needs an explicit purpose and review cycle.
Assumptions behind the numbers
No deployment total is asserted because plan selection, transfer allowances and retention have not been sized for an actual shop; pricing depends on usage, region and options.
How it stays reliable
Check useful application health
Use a lightweight health path and alert when healthy capacity falls; test whether the remaining instance can carry checkout demand.
Exercise database failover
The HA database provides a standby, but application reconnection and interrupted transaction handling still need testing.
Keep instances consistent
Maintain matching application versions, plugins and configuration, with shared database and media access verified before registering a replacement.
Prove the recovery targets
Restore snapshots and verify orders and media on a schedule; backup frequency alone does not prove restoration time or recoverable data age.
When this is a poor fit. A poor fit for a store whose unpredictable checkout peaks require automatic instance scaling or whose security requirements demand detailed network controls.