When designing features that will exist on Sourcegraph-managed instances we should consider if there will be an increase in cost. This document is primarily focused on infrastructure costs but you should also provide justification that costs will not increase with regards to:
- Setup time (will this feature make Sourcegraph harder to setup?)
- Support costs (has the customer support team been engaged and have they signed off on supporting this new feature?)
- Complexity (is this feature still being tested and requires additional steps)
If any of the above is true, this shouldn’t prevent you from launching on Cloud as long as your team will work closely with ours and this feature is clearly flagged as experimental.
Utilize feature flags (ie through site-config or experimental flags) such that a feature can be enabled or disabled as needed. This also allows for the Cloud team to roll out the changes using “canary” methodologies to limit the blast radius for managed instances.
Monitor and test features on S2. You can view the grafana dashboard for S2 here and the tracing dashboard here.
S2 has continous deployment so changes that are pushed to the
main branch will be deployed to S2. Its not always possible to determine how a change may affect the overall cost. It is the feature team’s responsibility to check the billing page to ensure that their feature is not causing any large spikes in cost. The billing view is saved here.
File a “Cloud Launch” ticket on our customer repository using the Cloud Launch template
One of the original goals of Cloud is to keep infrastructure costs capped to no more than private doc. This expresses the relationship between increased customer usage and infrastructure cost.
Balance cheap storage options. Storing large amounts of data in Cloud SQL has a significantly more cost than GCS. Does the storage need to be high performance?
Use the Cloud Launch template to notify the cloud team of your feature launch.
Inform the team of your proposed instance size (small, medium, large,etc ) based on the sizing guidance