Say I have two types of URL requests that must be handled by my REST API:
http://query.restapi.com/image.png?apikey=abc123
http://query.restapi.com/2.0/<apiKey>/resource.json?from=umi.us_census00.state_geometry
Only for static images (ie., regex: *.png?.*
) do I need to take advantage of CloudFront's caching and the rest of the requests will not get cached data and will need to go to the normal EC2 server (or at least take a speedier indirect route to the normal EC2 server?).
Perhaps the added request time for the misses to CloudFront is irrelevant to worry about?
Or perhaps my situation is not best to use for CloudFront?