Skip to content

Commit f628289

Browse files
authored
Moves recs on scalability page (#42)
1 parent 588f2cc commit f628289

File tree

1 file changed

+33
-22
lines changed

1 file changed

+33
-22
lines changed

source/scalability.txt

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,39 @@ The {+service+} CLI also helps you manage both local and cloud environments effi
6969
tasks and scaling resources as needed. This setup enables testing and development locally, minimizing
7070
unnecessary cloud usage.
7171

72+
Recommendations
73+
~~~~~~~~~~~~~~~
74+
75+
For development and testing environments, do not enable auto-scaling
76+
compute and auto-scaling storage. This saves costs in your
77+
non-production environments.
78+
79+
For staging and production environments, we recommend that you:
80+
81+
- Use a
82+
router-based, single-shard cluster to eliminate downtime when you
83+
migrate to a shard key with sharded collections in the future.
84+
- Enable auto-scaling for compute and storage for instances where your
85+
application grows organically from small to medium.
86+
87+
If you use IaC tools, leverage settings to ignore resource drift caused by auto-scaling. For example, in Terraform, if ``disk_gb_enabled`` is true, |service| will
88+
automatically scale disk size up and down. This will cause the value
89+
of ``disk_size_gb`` returned to potentially be different than what is
90+
specified in the Terraform config and if one then applies a plan, not
91+
noting this, Terraform will scale the cluster disk size back to the
92+
original ``disk_size_gb`` value. To prevent this a lifecycle
93+
customization should be used, i.e.:
94+
``lifecycle { ignore_changes = [disk_size_gb] }``.
95+
96+
Similarly, in Terraform, if ``compute_enabled`` is true, then
97+
|service| will automatically
98+
scale up to the maximum provided and down to the minimum, if provided. This will
99+
cause the value of ``provider_instance_size_name`` returned to potentially be different
100+
than what is specified in the Terraform config, and if one then applies a plan,
101+
not noting this, Terraform will scale the cluster back to the original
102+
``instanceSizeName`` value. To prevent this a lifecycle customization should be used,
103+
i.e.: ``lifecycle { ignore_changes = [provider_instance_size_name] }``.
104+
72105
Examples
73106
--------
74107

@@ -167,34 +200,12 @@ These examples also apply other recommended configurations, including:
167200
.. tab:: Staging and Prod Environments
168201
:tabid: stagingprod
169202

170-
Auto-scaling compute and storage are recommended for instances where your
171-
application grows organically from small to medium. Furthermore, a router
172-
based single shard cluster eliminates downtime when you migrate to a shard
173-
key with sharded collections in the future.
174-
175203
For your staging and production environments, create the
176204
following files for each application and environment
177205
pair. Place the files for each application and environment
178206
pair in their own directory. Change the IDs, names, and disk size
179207
to use your values.
180208

181-
If ``disk_gb_enabled`` is true, then |service| will
182-
automatically scale disk size up and down. This will cause the value of
183-
``disk_size_gb`` returned to potentially be different than what is
184-
specified in the Terraform config and if one then applies a plan, not
185-
noting this, Terraform will scale the cluster disk size back to the
186-
original ``disk_size_gb`` value. To prevent this a lifecycle
187-
customization should be used, i.e.:
188-
``lifecycle { ignore_changes = [disk_size_gb] }``.
189-
190-
If ``compute_enabled`` is true, then |service| will automatically
191-
scale up to the maximum provided and down to the minimum, if provided. This will
192-
cause the value of ``provider_instance_size_name`` returned to potentially be different
193-
than what is specified in the Terraform config, and if one then applies a plan,
194-
not noting this, Terraform will scale the cluster back to the original
195-
``instanceSizeName`` value. To prevent this a lifecycle customization should be used,
196-
i.e.: ``lifecycle { ignore_changes = [provider_instance_size_name] }``.
197-
198209
main.tf
199210
```````
200211

0 commit comments

Comments
 (0)