![]() domain created during the provisioning process works without alteration, but you might want to use a more friendly looking URL. For more information about managing Fastly services, see Working with services. Once a version is activated, it becomes locked and can no longer be modified. In general, the process of modifying a service configuration involves: Use the following command to open an authenticated session in the Fastly web interface: $ heroku addons:open fastlyĪll Fastly service configuration changes are versioned so that if a mistake is made, it can quickly be rolled back to a prior working version. Use Fastly’s web interface to make configuration changes to your Fastly service, view obtain real-time and historic CDN stats, and instantly purge cached content. This is how we know where to route requests for a given service. ![]() Domain - The URL visitors use to access your application.Backend - The address of the Heroku dyno from which Fastly pulls content (sometimes referred to as the “origin”).A Fastly service has at least one backend and one domain. Service - Represents the configuration for a website, application, API, or anything else to be served through Fastly.The following terms are useful to know to work with Fastly. For further explanation and examples related to Fastly, see Configuring caching. browser cache)Ī full list of directives is available in the specs linked above. max-age specifies a 24 hour TTL for other caches (e.g.s-maxage specifies a 30 day TTL for surrogate caches (e.g.public specifies this content can be cached.In general, the longer an object’s time to live (TTL), the higher the cache hit ratio, meaning fewer requests back to your dynos and better response time to clients.Ī typical Cache-Control header looks like the following: Cache-Control: public, s-maxage=2592000, max-age=86400 As such, we encourage you to consider which values make the most sense for your application. Correctly setting cache control headers on application responses can significantly impact performance. HTTP Cache-Control and Surrogate-Control headers tell Fastly which content to cache and for how long to cache it. If you’re familiar with HTTP caching, feel free to skip this section. It’s helpful to know a little about HTTP performance and optimization before starting. For example, you can add a custom domain. You can the configure this default configuration using the Fastly web interface. The default configuration works for serving static content over HTTP and HTTPS on the .net domain. To view Fastly configuration variables, run the heroku config command: $ heroku config -app example-appįASTLY_API_KEY: xxxxfeda106982643a06ea8990exxxxįASTLY_CDN_URL: .netĭuring the Fastly add-on provisioning process, a service is created on behalf of your application with the following default configuration: FASTLY_SERVICE_ID - The ID that uniquely identifies your Fastly service.You can also add custom domains to your service. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |