service-capacity-modeling 0.3.58__tar.gz → 0.3.59__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of service-capacity-modeling might be problematic. Click here for more details.
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/PKG-INFO +1 -1
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/cassandra.py +37 -8
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling.egg-info/PKG-INFO +1 -1
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/LICENSE +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/README.md +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/__init__.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/capacity_planner.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/__init__.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/__init__.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/pricing/aws/3yr-reserved_ec2.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/pricing/aws/3yr-reserved_zz-overrides.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/profiles.txt +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5a.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5d.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5n.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c6a.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c6i.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c6id.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c7a.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c7i.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m4.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m5.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m5n.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6a.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6i.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6id.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6idn.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6in.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m7a.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m7i.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r4.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r5.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r5n.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6a.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6i.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6id.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6idn.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6in.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r7a.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r7i.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/manual_drives.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/manual_instances.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/hardware/profiles/shapes/aws/manual_services.json +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/interface.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/__init__.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/common.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/headroom_strategy.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/__init__.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/__init__.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/aurora.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/counter.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/crdb.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/ddb.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/elasticsearch.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/entity.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/evcache.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/graphkv.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/iso_date_math.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/kafka.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/key_value.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/postgres.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/rds.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/stateless_java.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/time_series.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/time_series_config.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/wal.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/org/netflix/zookeeper.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/models/utils.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/stats.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/tools/__init__.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/tools/auto_shape.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/tools/fetch_pricing.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/tools/generate_missing.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling/tools/instance_families.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling.egg-info/SOURCES.txt +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling.egg-info/dependency_links.txt +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling.egg-info/entry_points.txt +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling.egg-info/requires.txt +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/service_capacity_modeling.egg-info/top_level.txt +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/setup.cfg +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/setup.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_arguments.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_buffers.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_common.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_desire_merge.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_generate_scenarios.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_hardware.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_hardware_shapes.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_headroom_strategy.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_io2.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_model_dump.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_reproducible.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_simulation.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_utils.py +0 -0
- {service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_working_set.py +0 -0
|
@@ -4,6 +4,7 @@ from typing import Any
|
|
|
4
4
|
from typing import Callable
|
|
5
5
|
from typing import Dict
|
|
6
6
|
from typing import Optional
|
|
7
|
+
from typing import Set
|
|
7
8
|
|
|
8
9
|
from pydantic import BaseModel
|
|
9
10
|
from pydantic import Field
|
|
@@ -47,6 +48,9 @@ from service_capacity_modeling.stats import dist_for_interval
|
|
|
47
48
|
logger = logging.getLogger(__name__)
|
|
48
49
|
|
|
49
50
|
BACKGROUND_BUFFER = "background"
|
|
51
|
+
CRITICAL_TIERS: Set[int] = {0, 1}
|
|
52
|
+
# cluster size aka nodes per ASG
|
|
53
|
+
CRITICAL_TIER_MIN_CLUSTER_SIZE = 2
|
|
50
54
|
|
|
51
55
|
|
|
52
56
|
def _write_buffer_gib_zone(
|
|
@@ -362,10 +366,7 @@ def _estimate_cassandra_cluster_zonal( # pylint: disable=too-many-positional-ar
|
|
|
362
366
|
# Cassandra clusters should aim to be at least 2 nodes per zone to start
|
|
363
367
|
# out with for tier 0 or tier 1. This gives us more room to "up-color"]
|
|
364
368
|
# clusters.
|
|
365
|
-
min_count = 0
|
|
366
|
-
if desires.service_tier <= 1:
|
|
367
|
-
min_count = 2
|
|
368
|
-
|
|
369
|
+
min_count = 2 if desires.service_tier in CRITICAL_TIERS else 0
|
|
369
370
|
base_mem = _get_base_memory(desires)
|
|
370
371
|
|
|
371
372
|
heap_fn = _cass_heap_for_write_buffer(
|
|
@@ -583,6 +584,33 @@ class NflxCassandraArguments(BaseModel):
|
|
|
583
584
|
|
|
584
585
|
|
|
585
586
|
class NflxCassandraCapacityModel(CapacityModel):
|
|
587
|
+
@staticmethod
|
|
588
|
+
def get_required_cluster_size(tier, extra_model_arguments):
|
|
589
|
+
required_cluster_size: Optional[int] = (
|
|
590
|
+
math.ceil(extra_model_arguments["required_cluster_size"])
|
|
591
|
+
if "required_cluster_size" in extra_model_arguments
|
|
592
|
+
else None
|
|
593
|
+
)
|
|
594
|
+
|
|
595
|
+
if tier not in CRITICAL_TIERS or required_cluster_size is None:
|
|
596
|
+
return required_cluster_size
|
|
597
|
+
|
|
598
|
+
# If the upstream explicitly set a cluster size, make sure it is
|
|
599
|
+
# at least CRITICAL_TIER_MIN_CLUSTER_SIZE. We cannot do a max
|
|
600
|
+
# of the two because the horizontal scaling is disabled
|
|
601
|
+
if required_cluster_size < CRITICAL_TIER_MIN_CLUSTER_SIZE:
|
|
602
|
+
raise ValueError(
|
|
603
|
+
f"Required cluster size must be at least "
|
|
604
|
+
f"{CRITICAL_TIER_MIN_CLUSTER_SIZE=} when "
|
|
605
|
+
f"service tier({tier}) is a "
|
|
606
|
+
f"critical tier({CRITICAL_TIERS})."
|
|
607
|
+
f"If it is an existing cluster, horizontally "
|
|
608
|
+
f"scale the cluster to be >= "
|
|
609
|
+
f"{CRITICAL_TIER_MIN_CLUSTER_SIZE}"
|
|
610
|
+
)
|
|
611
|
+
|
|
612
|
+
return required_cluster_size
|
|
613
|
+
|
|
586
614
|
@staticmethod
|
|
587
615
|
def capacity_plan(
|
|
588
616
|
instance: Instance,
|
|
@@ -601,11 +629,12 @@ class NflxCassandraCapacityModel(CapacityModel):
|
|
|
601
629
|
require_attached_disks: bool = extra_model_arguments.get(
|
|
602
630
|
"require_attached_disks", False
|
|
603
631
|
)
|
|
604
|
-
required_cluster_size: Optional[
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
632
|
+
required_cluster_size: Optional[
|
|
633
|
+
int
|
|
634
|
+
] = NflxCassandraCapacityModel.get_required_cluster_size(
|
|
635
|
+
desires.service_tier, extra_model_arguments
|
|
608
636
|
)
|
|
637
|
+
|
|
609
638
|
max_rps_to_disk: int = extra_model_arguments.get("max_rps_to_disk", 500)
|
|
610
639
|
max_regional_size: int = extra_model_arguments.get("max_regional_size", 192)
|
|
611
640
|
max_local_disk_gib: int = extra_model_arguments.get("max_local_disk_gib", 5120)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_arguments.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_desire_merge.py
RENAMED
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_hardware.py
RENAMED
|
File without changes
|
{service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_hardware_shapes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_model_dump.py
RENAMED
|
File without changes
|
{service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_reproducible.py
RENAMED
|
File without changes
|
{service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_simulation.py
RENAMED
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.58 → service_capacity_modeling-0.3.59}/tests/test_working_set.py
RENAMED
|
File without changes
|