_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

CDN konfigurace — obsah blíže uživateli

23. 02. 2016 1 min read intermediate

Architecture Beginner

CDN konfigurace — obsah blíže uživateli

CDNCloudFrontPerformance 3 min read

Konfigurace CDN pro webové aplikace. CloudFront, Cloudflare, cache headers.

Co je CDN?

Content Delivery Network distribuuje statický obsah do edge serverů po celém světě. Uživatel stahuje z nejbližšího serveru.

Cache Headers

# Immutable assets (s hash)
Cache-Control: public, max-age=31536000, immutable

# HTML (vždy revalidovat)
Cache-Control: no-cache

# API odpovědi
Cache-Control: private, max-age=60

CloudFront + S3

resource "aws_cloudfront_distribution" "cdn" {
  origin {
    domain_name = aws_s3_bucket.static.bucket_regional_domain_name
    origin_id   = "S3-static"
  }
  default_cache_behavior {
    allowed_methods        = ["GET", "HEAD"]
    viewer_protocol_policy = "redirect-to-https"
    compress               = true
    default_ttl            = 86400
  }
}

Summary

CDN je low-hanging fruit pro výkon. Správné cache headers + content hashing = dramatické zlepšení.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.