Limit the number of custom Pages domains on .com to 150

Summary

GitLab Pages currently allows for unlimited numbers of custom domains to be associated with a Pages site. At the extremes, this can cause slow response times for the backend Pages service. More information in this confidential issue.

In 15.4 we introduced the ability for self-managed instances to configure a limit for the number of domains per project. Starting in GitLab %15.5 we should limit the number of custom domains across per project across gitlab.com to 150.

Issue to introduce the limit here: https://gitlab.com/gitlab-org/gitlab/-/issues/373424

Why 150 and not 80?

The issues we have seen happen at the extremes. There are diminishing returns to limiting the domains lower than 150 and we have some customers who do actually use between 60-80 domains. A limit of 150 is a little arbitrary - it could be 200, or 125, but it wouldn't make much difference to performance.

Having a reasonable limit also makes future work to improve the UX easier, as we would have a manageable ceiling to work with when building out the UI.

Breaking Change

As we never marketed the service with unlimited custom domains as a selling point, this isn't a change to policy or offering. Rather it's the introduction of a reasonable limit. If Premium or Ultimate tiers find this limiting, we can explore offering a higher limit for paid tiers.

Currently no users are over the limit on GitLab.com. In the past, we have had projects with over 3,000 domains which caused issues. Introducing this limit now prevents us from getting into that situation again and having to reactively enforce a limit.

Affected Topology

SaaS users of Pages who have more than 150 domains (at last count, this was 2 customers). These users, if they exist, will be able to continue using Pages but will not be able to add additional custom domains until they fall under the 150 limit.

Affected Tier

Free, Premium, and Ultimate

Edited by Eric Schurter