When deciding where to place your origin shield in a content delivery network (CDN) setup like Fastly, you need to balance several factors: latency, network efficiency, and the distribution of your user base. Here are some considerations to help you make an informed decision:
Factors to Consider:
-
User Proximity:
- Kolkata: 85% of your users are in Kolkata, and the ping from users to the Kolkata POP is 5 ms. This means placing the shield in Kolkata will provide a very low latency experience for the majority of your users.
- Hyderabad: While the ping from the origin server to the Hyderabad POP is 2 ms, the majority of your users are not in Hyderabad.
-
Network Efficiency:
- Kolkata: Placing the shield in Kolkata will reduce the latency for 85% of your users, which is crucial for a good user experience.
- Hyderabad: Placing the shield in Hyderabad will reduce the latency between the origin server and the shield, but it will increase the latency for the majority of your users.
-
Origin Shield Function:
- The origin shield is designed to reduce the load on your origin server by caching content closer to the edge. Placing it closer to your users will improve cache hit rates and reduce the load on your origin server.
Recommendation:
Given that 85% of your users are in Kolkata and the ping from users to the Kolkata POP is 5 ms, it makes sense to place the origin shield in Kolkata. This will provide the best user experience for the majority of your users and will also help in reducing the load on your origin server.
Additional Considerations:
- Redundancy and Failover: Ensure that you have a failover strategy in place. If the Kolkata shield goes down, you might want to have a secondary shield in another location (e.g., Hyderabad) to ensure high availability.
- Monitoring and Analytics: Use Fastly's monitoring and analytics tools to track the performance and cache hit rates. This will help you fine-tune your setup over time.
Conclusion:
Place the origin shield in Kolkata to optimize for the majority of your users. This will provide the best balance of low latency and high cache hit rates, ensuring a better user experience and reduced load on your origin server.