Every young company faces the problem of scaling out infrastructure and increasing the throughput servers can sustain in order to provide a better customer experience and serve more customers without doubling resources.
Of course, caching static assets is a good way to alleviate the load in your web servers, but in our case the vast majority of traffic comes through our SDKs. As we scale, we are looking at different caching strategies to speed up our API servers in order to increase the throughput our infra can provide.
Caching alone is not enough when you look at speeding up your API services, however. The return values of your endpoints are very likely to change (sometimes very quickly), so the ability to immediately purge those cached values at the CDN edge play an important role in avoiding serving stale data for a long period of time. One of the features we like about Fastly is the instant purging time of the cached assets, which makes it one of the best CDNs out there when it comes to caching APIs. Solutions like CloudFront are less ideal in this case because their purging periods vary from 5 to 15 minutes. We also evaluated MaxCDN, which failed to match such a fast purging speed at the time, though they seem to be moving in that direction now.
In order to reduce the friction of interfacing with Fastly from Java, we contributed with a tiny Open Source wrapper for their API, which can be found in Github.
Take a look and let us know what you think—feedback and feature requests are always welcome.
And if this type of work interests you, we are always looking for great engineers to help us solve complex problems. Check out our job openings to learn more.
Stay up to date
Don’t miss out! Subscribe to our digest to get the latest about feature flags, continuous delivery, experimentation, and more.
With feature flags, you can control the percentage allocation of users you want to be exposed to a specific feature. This process provides risk mitigation and confirms both usability and scalability. Canary releases, or controlled rollouts, serve as an added layer of protection in case something goes wrong. What is…
Feature flagging is a technique development teams deploy to enable easy switches between codepaths in their systems, at runtime. In simpler terms, they’re control structures that toggle on and off the code inside them. Dev teams use feature flags for a wide variety of purposes, from canary releases to A/B…
If our organizations want to survive this period of political and economic uncertainty, they must be able to move with speed and adaptability.