NavigationContentFooter
Jump toSuggest an edit

How to get started with Edge Services

Reviewed on 18 March 2024Published on 14 September 2023

Edge Services is an additional feature for Scaleway Object Storage buckets, currently available in Public Beta.

Enabling Edge Services on your Object Storage bucket brings you a number of possible benefits:

  • Customize your bucket’s endpoint using a subdomain of your own domain
  • Add your own SSL/TLS certificate, safeguarded in Scaleway Secret Manager, or generate a managed Let’s Encrypt certificate, so your subdomain can serve content from your bucket over HTTPS
  • Enhance performance by caching your stored objects, to be served directly by Edge Services from the cache
  • Finely control your cached objects via purging (cache invalidation)

Read on to learn how to enable Edge Services on your bucket, and configure your endpoint and cache.

Before you start

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • An Object Storage bucket

How to enable Edge Services

Edge Services is available as a feature on Object Storage buckets. It must be enabled on a bucket-by-bucket basis.

  1. Click Object Storage in the Storage section of the Scaleway console side menu. The list of your buckets displays.

  2. Click the name of the bucket you want to enable Edge Services on.

  3. Click the Edge Services tab.

  4. Click Enable Edge Services for free.

    A pop-up informs you that your bucket will be exposed via Edge Services and that you can disable Edge Services at any time. Edge Services is free during the beta stage, and you will be notified before it becomes billable.

  5. Click Enable Edge Services to confirm.

    Edge Services is enabled on your bucket, and its various features are now visible on the Edge Services tab, ready to be configured.

    Important

    Your bucket’s visibility can be set to private, but any objects within it that you want to expose via Edge Services must be set to public visibility. However, in the case that you are using Edge Services with bucket website (see below), objects can remain private.

    Important

    Note the following important information about using Edge Services with the bucket website feature:

    • If you want to use bucket website and Edge Services: Ensure that you activate bucket website before you enable Edge Services. Avoid deactivating bucket website afterwards.

    • If you do not want to use bucket website: Simply enable Edge Services. Note however that if you activate bucket website after this, Edge Services will not be able to serve your bucket website URLs, and will continue to serve the regular bucket URLs.

    • If you want to change your bucket website setting: Disable Edge Services first, activate or deactivate bucket website as you wish, and then enable Edge Services. Edge Services will now pick up the new configuration, and will serve content from your bucket website URLS if bucket website is activated, or from your regular bucket URLs if bucket website is deactivated.

How to access your bucket via Edge Services

Once you have enabled Edge Services on your bucket, you can access your bucket and its content via the following endpoints (replace bucket-name with the name of your bucket.)

EndpointWhere to find this endpoint in the consoleNotes
https://bucket-name.s3.nl-ams.scw.cloudThe Bucket settings tabEdge Services is bypassed when bucket is accessed via this endpoint
https://bucket-name.svc.edge.scw.cloudThe Edge Services tabEdge Services serves bucket content when this endpoint is used

The two endpoints shown above are available as standard. However, with Edge Services, you can also choose to configure a custom domain from which your bucket can be accessed. Read more about this in the next section.

How to use custom domains

How to configure a custom domain

If you already own a domain, you can use Edge Services to set a subdomain of your choice through which your bucket can be accessed.

For example, if you own beautiful-domain.com, you can configure your bucket to be accessed via the subdomain whatever-i-want.beautiful-domain.com. You must also add an SSL/TLS certificate so that your subdomain can securely serve your bucket’s content via HTTPS.

EndpointWhere to find this endpoint in the consoleNotes
https://whatever-i-want.beautiful-domain.comThe Edge Services tab (after customization)Edge Services serves bucket content when this endpoint is used. The pre-existing endpoints shown in the table in the previous section also continue to be functional as before.

You cannot customize your endpoint with a primary domain directly (e.g. beautiful-domain.com), only with a subdomain of it.

The procedure for adding a customized endpoint is as follows:

  1. Click Object Storage in the Storage section of the Scaleway console side menu. The list of your buckets displays.

  2. Click the name of the bucket you want to configure a custom domain for.

  3. Click the Edge Services tab.

  4. In the Endpoint panel, click Configure domain. The following screen displays:

  5. Set a subdomain from which your bucket will be accessible. You must already own the primary domain. For example, if you own beautiful-domain.com, choose any subdomain you like and enter my-chosen-subdomain.beautiful-domain.com into the box.

    Important

    It is not possible to use only a root domain (aka primary domain or apex domain), you must use a subdomain. This is because CNAME records, essential to point your domain to your Edge Services endpoint, cannot by definition be created for root domains, only for subdomains. ✅ blog.example.com ❌ example.com

  6. This step depends on whether the domain used in the previous step is managed with Scaleway Domains and DNS, or an external domain provider. Choose the appropriate tab below.

    The domain you are using for Edge Services is considered to be managed with Scaleway Domains and DNS if:

    • You registered the domain with Domains and DNS, or
    • You transferred an externally-registered domain to Domains and DNS

    If either of the above is true, Scaleway will auto-detect that the domain is managed by Domains and DNS, and a message will display confirming that you do not need to create a CNAME record. We will auto-generate the appropriate CNAME record in your domain’s DNS records, to point your subdomain to the Edge Services endpoint for your bucket. This record is generated when you click Customize domain in step 8.

    You should not attempt to modify or delete the CNAME record, which will be visible among your DNS records in the Scaleway console.

  7. Provide an SSL/TLS certificate for your subdomain so that it can serve traffic over HTTPS. You have three options for this:

    • Generate a free Let’s Encrypt certificate, managed by Scaleway, including automatic renewals.
    • Select an existing certificate that you have stored in Scaleway Secret Manager.
    • Manually import a certificate into Scaleway Secret Manager:
      • Enter a name for your certificate (alphanumeric characters only)
      • Optionally, add tags by typing each tag and then pressing enter
      • Copy and paste the full PEM-formatted certificate chain into the box. Your certificate will be automatically stored in Secret Manager and billed accordingly.
    Tip

    For help with SSL/TLS certificates for Edge Services, and/or dealing with any errors you encounter importing a certificate into Secret Manager, see our dedicated documentation.

  8. Click Customize domain to finish.

Your customized domain is set up, and you are returned to the Edge Services dashboard. The customized domain displays in the Endpoint panel. When you access your bucket through this domain, its content will be served via Edge Services.

Note

If you chose to generate a managed Let’s Encrypt certificate, allow a few minutes for the certificate to finish creating. When the process is complete and the certificate is ready, you will see a green status light for SSL/TLS certificate on your endpoint dashboard.

How to edit your customized domain or its certificate

After customizing your domain, you can edit it (or its certificate) at any time as follows:

  1. Click Object Storage in the Storage section of the Scaleway console side menu. The list of your buckets displays.

  2. Click the name of the bucket you want to configure a custom domain for.

  3. Click the Edge Services tab.

  4. In the Endpoint panel, click Edit. The Edit Domain screen displays.

  5. Edit the subdomain as desired - do not forget to also set up a new CNAME record, if necessary.

  6. Edit your certificate options as required - choose to generate a managed Let’s Encrypt certificate, managed by Scaleway including automatic renewals, or select a different certificate from Secret Manager, or manually import a new certificate for your custom domain.

  7. Click Edit domain to finish.

How to reset your customized domain to the original Edge Services endpoint

Even though the original Edge Services endpoint (e.g. https://bucket-name.svc.edge.scw.cloud) will continue to work after you add a customized domain, you can choose to remove your customized domain completely and go back to the original Edge Services endpoint only. This is done via the reset function:

  1. Click Object Storage in the Storage section of the Scaleway console side menu. The list of your buckets displays.

  2. Click the name of the bucket you want to configure a custom domain for.

  3. Click the Edge Services tab.

  4. In the Endpoint panel, click Reset.

    A screen displays warning you that this will reset the bucket’s domain back to the default Edge Services endpoint. Edge Services will consider your customized subdomain as unknown. You should also remember to:

    • Delete your CNAME record from your domain provider, unless your domain is managed with Scaleway Domains and DNS, in which case we take care of deletion for you.
    • Delete any SSL/TLS certificates you imported into Secret Manager (if no longer required elsewhere, so that you are no longer billed for it). If you generated a managed Let’s Encrypt certificate however, Scaleway takes care of the deletion for you.
  5. Click Reset domain to finish.

How to configure your cache

The cache feature allows you to cache your bucket’s content with Edge Services. This means that content can be served directly to users from Edge Services’ servers, enhancing performance.

You can disable and enable caching at will, as well as control the lifetime of an object in the cache. You can also purge your entire cache, or specific objects within it. A log is displayed to help you track your purge events.

How to enable your cache

  1. Click Object Storage in the Storage section of the Scaleway console side menu. The list of your buckets displays.

  2. Click the name of the bucket you want to configure a cache for.

  3. Click the Edge Services tab.

  4. In the Cache panel, use the «Toogle Icon» icon to enable the cache.

    The Lifetime configuration box displays. This enables you to define, in seconds, how long an object can be stored in the cache before it must be retrieved freshly from the bucket.

    Tip

    As an example, a value of 0 means that objects will not be cached, unless they have a separately-defined caching directive. Note that in any case, if an object has a caching directive, the caching directive always takes precedence over any lifetime setting defined here in Edge Services.

  5. Leave the default value of 1 hour in place, or enter another value.

The cache is now enabled.

How to purge all objects from your cache

This clears all objects from your cache. Afterwards, Edge Services will retrieve fresh copies from the bucket before it stores them again in the cache.

  1. Click Object Storage in the Storage section of the Scaleway console side menu. The list of your buckets displays.

  2. Click the name of the bucket you want to purge the cache for.

  3. Click the Edge Services tab.

  4. In the Purge cache panel, click Purge all.

    A screen displays warning you that your cache will be emptied, and Edge Services will have to retrieve objects from your bucket before re-caching them.

  5. Click Purge cache to confirm.

How to purge specific objects from your cache

This allows you to specify the precise objects that you want to clear from the cache. Afterwards, Edge Services will retrieve fresh copies from the bucket before it stores them again in the cache.

  1. Click Object Storage in the Storage section of the Scaleway console side menu. The list of your buckets displays.

  2. Click the name of the bucket you want to purge cache objects for.

  3. Click the Edge Services tab.

  4. In the Purge cache panel, click Purge by object.

    A screen displays prompting you to enter the path of each object you want to purge from the cache.

  5. Enter the path of each object you want to purge. You can purge a maximum of 5 objects at a time.

    Tip

    The path for each object should be defined from the root of the bucket, and must start with a slash. If we imagine a bucket containing one file at the root level called object1.jpg, and a subfolder at root level called videos containing an item called my-video.mp4, we would enter the object paths as follows:

    • /object1.jpg
    • /videos/my-video.mp4

    You cannot purge entire subfolders by simply specifying the path to the subfolder, e.g. /videos. Purging objects must done strictly object-by-object, so /videos/my-video1.mp4, /videos/my-video2.mp4, /videos/my-video3.mp4 etc. Watch this space for updates to this feature in the future.

  6. Click Purge objects from cache

    The specified objects are purged from your cache and you are returned to the Edge Services dashboard.

How to disable your cache

  1. Click Object Storage in the Storage section of the Scaleway console side menu. The list of your buckets displays.

  2. Click the name of the bucket you want to disable caching for.

  3. Click the Edge Services tab.

  4. In the Cache panel, use the «Toogle Icon» icon to disable the cache.

    A pop-up displays, asking you to confirm the action.

  5. Click Disable cache.

    Your cache is purged and disabled. Edge Services will now serve content by fetching it from your Object Storage bucket directly. If you reenable your cache at a later point, you will begin with an empty cache.

How to monitor Edge Services with Scaleway Cockpit

You can view your Edge Services metrics via Scaleway Cockpit. This allows you to monitor your ingress, egress, request rate and cache hit ratio as well as other metrics, in a convenient managed Grafana dashboard.

Access your Edge Services dashboard in the Scaleway console via the shortcut in Edge Services tab of the bucket in question. Note that you will first need to create a Grafana user and credentials.

Understanding the dashboard

The Grafana dashboard presents a number of different metrics. Use the Bucket name drop-down in the top left to select which bucket to view Edge Services metrics for, and the time range drop-down in the top right to modify the time period to apply to the metrics.

  • Request rate: The number of requests made to Edge Services per second, for the specified bucket, averaged over the specified time period.

  • Cache hit ratio: The percentage of requests served from Edge Services’ cache, compared to the total number of requests in total to Edge Services for this bucket, over the specified time period.

  • Cache HIT/MISS: A visual representation of the ratio of cache hits to misses, for the specified bucket, over the specified time period.

    • Cache hit line: The number of requests per second made to Edge Services for this bucket, which were served directly from its cache.
    • Cache miss line: The number of requests per second made to Edge Services for this bucket, where the content was fetched from the bucket rather than the cache.
    • Total line: The number of requests per second made to Edge Services for this bucket.
  • Egress (to client): The total volume of data served to clients from Edge Services, for the specified bucket, over the specified time period.

  • Ingress (from origin): The total volume of data from the origin bucket’s server to Edge Services over the specified time period. This represents the traffic that occurs when Edge Services retrieves content from the bucket’s server in order to fulfill requests.

  • Edge Services throughput: A visual representation of the rate of data transfer for the specified bucket with Edge Services over the specified time period.

    • Output bitrate line: The rate at which data is being delivered from Edge Services to end users.
    • Input bitrate line: The rate at which Edge Services is fetching data from the origin bucket server. Peaks in this line may represent times when Edge Services had to fetch content from the origin bucket, rather than being able to serve it directly from its own cache.
  • Requests served: The total number of requests that Edge Services has successfully served, for the specified bucket, over the specified time period.

  • Edge Services response statuses: A visual representation of the distribution of HTTP response statuses for requests served by Edge Services over the specified time period. Consult the full list of HTTP status codes for more information if necessary.

  • Request origin country: The proportion of requests (to Edge Services for the specified bucket over the specified time period) originating from different countries.

  • End users location: A visual representation of where Edge Services end users have been making requests from geographically.

How to disable Edge Services

You can disable Edge Services at any time via the following procedure:

  1. Click Object Storage in the Storage section of the Scaleway console side menu. The list of your buckets displays.

  2. Click the name of the bucket you want to disable Edge Services for.

  3. Click the Edge Services tab.

  4. In the Disable Edge Services panel at the bottom of the screen, click Disable Edge Services.

    A pop-up displays, informing you that the bucket will be removed from Edge Services.

    • The bucket will no longer be accessible via its Edge Services endpoint, or any customized domains pointing to this endpoint.
    • Any files stored in the Edge Services cache will be removed.
    Tip

    Remember to:

    • Delete your CNAME record from your domain provider, unless your domain is managed with Scaleway Domains and DNS, in which case we take care of deletion for you.
    • Delete any SSL/TLS certificates you imported into Secret Manager (if no longer required elsewhere, so that you are no longer billed for it). If you generated a managed Let’s Encrypt certificate however, Scaleway takes care of the deletion for you.
  5. Click Disable Edge Services.

    Edge Services is disabled. You can enable it again at any time, but you will need to reconfigure your custom domain, and the cache will initially be empty.

See also
How to use Object Storage with Private NetworksHow to delete an object
Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway