Setup Cdn Optimization
Configure CDN for optimal content delivery, caching, and global performance optimization
$ npx claude-code-templates@latest --command="performance/setup-cdn-optimization" --yesRequires Claude Code. The command adds this command to your project's .claudedirectory — nothing runs on ToolZip's servers.
What's inside this command
Component source
Setup CDN Optimization
Configure CDN for optimal delivery: $ARGUMENTS
Instructions
- CDN Strategy and Provider Selection
- Evaluate CDN providers based on performance, cost, and features
- Assess content types and specific caching requirements
- Plan CDN architecture and edge location strategy
- Define performance and cost optimization goals
- CDN Configuration and Setup
- Set up origin servers and failover configurations
- Configure SSL/TLS certificates and security settings
- Implement custom domain and DNS configuration
- Set up monitoring and analytics tracking
- Static Asset Optimization
- Configure content hashing and versioning strategies
- Set up asset bundling and code splitting for CDN
- Implement responsive image delivery and optimization
- Configure font loading and optimization strategies
- Compression and Optimization
- Set up build-time compression for static assets
- Implement dynamic compression for API responses
- Configure minification and asset optimization
- Set up progressive image formats (WebP, AVIF)
- Cache Headers and Policies
- Configure cache control headers and TTL values
- Implement ETags and conditional request handling
- Set up cache hierarchy and multi-tier caching
- Configure cache warming and preloading strategies
- Image Optimization and Delivery
- Set up automatic image compression and optimization
- Configure lazy loading and progressive image loading
- Implement image resizing and format conversion
- Set up WebP and AVIF format support with fallbacks
- CDN Purging and Cache Invalidation
- Set up automated purging for deployment pipelines
- Configure selective purging by tags or patterns
- Implement real-time cache invalidation for dynamic content
- Set up cache invalidation monitoring and alerts
- Performance Monitoring and Analytics
- Monitor cache hit ratios and bandwidth usage
- Track response times and error rates across regions
- Implement real user monitoring for CDN performance
- Set up alerts for performance degradation
- Security and Access Control
- Implement hotlink protection and referrer validation
- Set up DDoS protection and rate limiting
- Configure geo-blocking and access restrictions
- Implement secure token authentication for protected content
- Cost Optimization and Monitoring
- Implement cost optimization strategies for bandwidth usage
- Set up automated cost alerts and budget monitoring
- Analyze usage patterns for tier optimization
- Configure cost-effective caching policies
Focus on CDN optimizations that provide the most significant performance improvements for your specific content types and user base. Always measure CDN performance impact and adjust configurations based on real-world usage patterns.
Related Claude Code Commands
Optimize Database Performance
Optimize database queries, indexing, and performance for improved response times and scalability
Performance Audit
Comprehensive performance audit with metrics, bottleneck identification, and optimization recommendations
Optimize Bundle Size
Reduce and optimize bundle sizes through analysis, configuration, and code splitting strategies
Optimize Build
A ready-to-install Claude Code component.
Optimize Api Performance
Comprehensive API performance optimization with response time reduction, throughput improvement, and scalability enhancements
Implement Caching Strategy
Design and implement comprehensive caching solutions for improved performance and scalability
Catalog data and component content are sourced from the open-source davila7/claude-code-templates project (MIT license). ToolZip curates the listing and writes original descriptions; every component links back to its original source. Claude Code is a product of Anthropic. ToolZip is an independent catalog and is not affiliated with or endorsed by Anthropic.