Client

NDA Protected Technology Client

Improving Global Web Application Performance with Amazon CloudFront

The client operated a global online retail application hosted in a single AWS region. Although the application and origin infrastructure were functioning correctly, customers in distant regions experienced slow page loads, particularly when pages contained multiple high-resolution product images.

Bobcares analyzed the application’s traffic and content patterns and identified distance and repeated origin requests as key performance factors. Amazon CloudFront was introduced to cache static content closer to users, while dynamic requests continued reaching the existing application infrastructure. Product images were also delivered directly from Amazon S3 through CloudFront.

Case Study Section

Business Challenge

Customers located far from the application's AWS region experienced slow page loads and delayed image delivery. Static assets were repeatedly served from the origin, increasing unnecessary application traffic. The client needed to improve global performance without unnecessarily scaling the existing origin infrastructure.

Technology Used

Amazon CloudFront Amazon S3 Amazon Route 53 Application Load Balancer Application Containers Amazon Aurora Amazon CloudWatch AWS Certificate Manager Origin Access Control

Blueprint

Amazon CloudFront was positioned in front of the application with the Application Load Balancer and Amazon S3 configured as separate origins. Static assets and product images were cached at edge locations, while dynamic application requests bypassed caching and continued to the existing origin infrastructure.

web

Performance Optimization & Monitoring

Case Study

Key Outcomes

  • Improved page-load experience for users located far from the origin.
  • Reduced repeated requests reaching the application origin.
  • Reduced origin CPU spikes during traffic bursts.
  • Delivered product images directly from Amazon S3 through CloudFront.
  • Increased the cache hit ratio after optimizing cache-key configuration.
  • Reduced bandwidth served directly from the origin.
  • Avoided unnecessary scaling of the existing origin instance.

Customer Profile

The client was a mid-sized online retailer serving customers across multiple regions. Its web application operated from a single AWS region with Route 53, an Application Load Balancer, application containers, and an Aurora database. Product images were stored in Amazon S3 but were being served through the application. The growing geographic distance between users and the origin created noticeable performance differences across regions.

The Challenges

  • Users located far from the origin experienced slow page loads.
  • Static assets were repeatedly fetched from the origin.
  • Product images were unnecessarily passing through the application layer.
  • The origin lacked meaningful cache headers.
  • Session-based content, pricing, inventory, and checkout traffic required careful cache handling.
  • An inefficient cache key risked reducing cache effectiveness.
  • Traffic bursts caused CPU spikes at the origin.

Why Bobcares?

  • Established a performance baseline before introducing caching.
  • Measured application behavior from multiple geographic regions.
  • Distinguished static content from dynamic and session-specific content.
  • Designed cache behaviors according to how different application paths were used.
  • Optimized cache keys to avoid unnecessary cache fragmentation.
  • Used existing infrastructure rather than introducing unnecessary origin changes.
  • Monitored CloudFront performance to validate the effectiveness of the implementation.

What We Delivered

  • Created an Amazon CloudFront distribution.
  • Configured the Application Load Balancer as an origin for dynamic application traffic.
  • Configured Amazon S3 as a separate CloudFront origin for product images.
  • Applied Origin Access Control to restrict direct access to the S3 bucket.
  • Configured separate cache behaviors for static, image, asset, and dynamic paths.
  • Designed cache keys according to the content requirements of each behavior.
  • Configured TTLs based on content characteristics.
  • Enabled compression and modern HTTP transport.
  • Configured HTTPS using AWS Certificate Manager.
  • Integrated CloudFront metrics with Amazon CloudWatch.
  • Enabled detailed request logging to Amazon S3.
  • Optimized tracking parameters in the cache key after monitoring revealed cache fragmentation.

Results

Global Page Performance

  • Before: Customers located far from the origin experienced page loads that could take several seconds to become usable.
  • After: Distant users received static content from nearby CloudFront edge locations, significantly improving the page-load experience.

Origin Load

  • Before: Static requests and product images repeatedly reached the application origin, contributing to CPU spikes during traffic bursts.
  • After: CloudFront absorbed much of the static traffic, leaving the origin to handle dynamic operations such as authentication, cart operations, checkout, and live inventory.

Cache Performance

  • Before: The initial cache hit ratio was lower than expected because marketing tracking parameters created separate cache entries for otherwise identical content.
  • After: Unnecessary tracking parameters were removed from the cache key, allowing equivalent requests to share cached objects and improving the cache hit ratio.

Origin Bandwidth

  • Before: A substantial amount of content, including product images, was served through the application origin.
  • After: Product images and other cached content were delivered through CloudFront, substantially reducing bandwidth served directly from the origin.

Origin Scaling

  • Before: The client was considering a substantially larger origin instance because of CPU spikes during traffic bursts.
  • After: CloudFront reduced the static workload reaching the origin, allowing the existing instance to continue operating with comfortable headroom.

The Business Impact

  • Improved the experience for customers across geographically distant regions.
  • Reduced the performance gap between users near and far from the AWS origin region.
  • Reduced unnecessary application and origin processing.
  • Allowed the existing origin infrastructure to handle a smaller, more predictable dynamic workload.
  • Reduced operational pressure caused by traffic bursts.
  • Avoided an unnecessary origin infrastructure upgrade.
  • Created better visibility into CDN and origin traffic through CloudWatch monitoring.

Ongoing Collaboration

  • Monitor CloudFront cache hit ratio and origin request volumes.
  • Review cache behavior performance by path.
  • Monitor CloudFront error rates and traffic patterns.
  • Review cache keys when new URL parameters or application paths are introduced.
  • Monitor origin workload as the dynamic application workload grows.
  • Review CloudFront costs against user geography and data transfer patterns.
  • Continue performance tuning based on observed traffic behavior.

Conclusion

The client's performance issue was primarily driven by geographic distance and repeated delivery of static content from a single origin. Bobcares introduced Amazon CloudFront, separated static and dynamic traffic, optimized caching, and delivered product images directly from Amazon S3. The resulting edge delivery reduced origin load, improved global page performance, and removed the immediate need for a larger origin instance.