service-capacity-modeling 0.3.98__tar.gz → 0.3.100__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.
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/PKG-INFO +1 -1
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/interface.py +25 -1
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/aurora.py +1 -1
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/control.py +32 -5
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/entity.py +35 -2
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling.egg-info/PKG-INFO +1 -1
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/LICENSE +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/README.md +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/__init__.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/capacity_planner.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/enum_utils.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/__init__.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/__init__.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/pricing/aws/3yr-reserved_ec2.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/pricing/aws/3yr-reserved_rds.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/pricing/aws/3yr-reserved_zz-overrides.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/profiles.txt +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5a.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5d.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5n.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c6a.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c6i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c6id.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c7a.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c7i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c8i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_db_r6g.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_db_r6i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_db_r7g.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_db_r7i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_i3en.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_i4i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_i7i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m4.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m5.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m5n.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6a.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6id.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6idn.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6in.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m7a.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m7i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m8i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r4.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r5.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r5n.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6a.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6id.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6idn.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6in.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r7a.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r7i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r8i.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/manual_drives.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/manual_instances.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/hardware/profiles/shapes/aws/manual_services.json +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/__init__.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/common.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/headroom_strategy.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/__init__.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/__init__.py +1 -1
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/cassandra.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/counter.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/crdb.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/ddb.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/elasticsearch.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/evcache.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/graphkv.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/iso_date_math.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/kafka.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/key_value.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/postgres.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/rds.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/stateless_java.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/time_series.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/time_series_config.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/wal.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/org/netflix/zookeeper.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/models/utils.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/stats.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/tools/__init__.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/tools/auto_shape.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/tools/fetch_pricing.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/tools/generate_missing.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling/tools/instance_families.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling.egg-info/SOURCES.txt +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling.egg-info/dependency_links.txt +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling.egg-info/entry_points.txt +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling.egg-info/requires.txt +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/service_capacity_modeling.egg-info/top_level.txt +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/setup.cfg +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/setup.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_arguments.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_buffers.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_common.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_desire_merge.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_enum_utils.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_generate_scenarios.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_hardware.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_hardware_shapes.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_headroom_strategy.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_io2.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_model_dump.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_reproducible.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_simulation.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_utils.py +0 -0
- {service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_working_set.py +0 -0
|
@@ -1064,12 +1064,36 @@ class CapacityDesires(ExcludeUnsetModel):
|
|
|
1064
1064
|
.get("estimated_state_size_gib", None)
|
|
1065
1065
|
)
|
|
1066
1066
|
user_count = self.data_shape.estimated_state_item_count
|
|
1067
|
-
|
|
1067
|
+
|
|
1068
|
+
# Bidirectional inference: state_size_gib ↔ item_count
|
|
1069
|
+
#
|
|
1070
|
+
# Users often know one but not the other. We can infer the missing value:
|
|
1071
|
+
# state_size_gib = item_count × item_size_bytes
|
|
1072
|
+
# item_count = state_size_gib / item_size_bytes
|
|
1073
|
+
#
|
|
1074
|
+
# Item size comes from write_size (the size of records written to storage).
|
|
1075
|
+
# For read-only workloads (e.g., read replicas), use read_size as fallback.
|
|
1076
|
+
# If user provided both or neither, no inference is needed.
|
|
1077
|
+
item_size_bytes = (
|
|
1078
|
+
desires.query_pattern.estimated_mean_write_size_bytes.mid
|
|
1079
|
+
or desires.query_pattern.estimated_mean_read_size_bytes.mid
|
|
1080
|
+
)
|
|
1081
|
+
|
|
1068
1082
|
if user_size is None and user_count is not None:
|
|
1083
|
+
if not item_size_bytes:
|
|
1084
|
+
raise ValueError(
|
|
1085
|
+
"Model default_desires() must set estimated_mean_write_size_bytes "
|
|
1086
|
+
"or estimated_mean_read_size_bytes to infer state_size_gib"
|
|
1087
|
+
)
|
|
1069
1088
|
desires.data_shape.estimated_state_size_gib = user_count.scale(
|
|
1070
1089
|
factor=(item_size_bytes / GIB_IN_BYTES)
|
|
1071
1090
|
)
|
|
1072
1091
|
elif user_size is not None and user_count is None:
|
|
1092
|
+
if not item_size_bytes:
|
|
1093
|
+
raise ValueError(
|
|
1094
|
+
"Model default_desires() must set estimated_mean_write_size_bytes "
|
|
1095
|
+
"or estimated_mean_read_size_bytes to infer item_count"
|
|
1096
|
+
)
|
|
1073
1097
|
user_size_gib = self.data_shape.estimated_state_size_gib
|
|
1074
1098
|
desires.data_shape.estimated_state_item_count = user_size_gib.scale(
|
|
1075
1099
|
factor=(GIB_IN_BYTES / item_size_bytes)
|
|
@@ -307,7 +307,7 @@ class NflxAuroraCapacityModel(CapacityModel):
|
|
|
307
307
|
|
|
308
308
|
@staticmethod
|
|
309
309
|
def allowed_platforms() -> Tuple[Platform, ...]:
|
|
310
|
-
return Platform.aurora_mysql, Platform.
|
|
310
|
+
return Platform.aurora_mysql, Platform.aurora_postgres
|
|
311
311
|
|
|
312
312
|
@staticmethod
|
|
313
313
|
def default_desires(
|
|
@@ -67,23 +67,50 @@ class NflxControlCapacityModel(CapacityModel):
|
|
|
67
67
|
def compose_with(
|
|
68
68
|
user_desires: CapacityDesires, extra_model_arguments: Dict[str, Any]
|
|
69
69
|
) -> Tuple[Tuple[str, Callable[[CapacityDesires], CapacityDesires]], ...]:
|
|
70
|
-
def
|
|
70
|
+
def _modify_rds_desires(
|
|
71
71
|
user_desires: CapacityDesires,
|
|
72
72
|
) -> CapacityDesires:
|
|
73
|
+
"""RDS proxy for Control service."""
|
|
73
74
|
relaxed = user_desires.model_copy(deep=True)
|
|
74
75
|
|
|
75
|
-
#
|
|
76
|
+
# RDS doesn't support tier 0
|
|
76
77
|
if relaxed.service_tier == 0:
|
|
77
78
|
relaxed.service_tier = 1
|
|
78
79
|
|
|
79
|
-
# Control caches reads
|
|
80
|
-
|
|
80
|
+
# Control caches reads, so proxy only sees writes + minimal reads
|
|
81
|
+
relaxed.query_pattern.estimated_read_per_second = certain_int(1)
|
|
82
|
+
if relaxed.query_pattern.estimated_write_per_second:
|
|
83
|
+
relaxed.query_pattern.estimated_write_per_second = (
|
|
84
|
+
relaxed.query_pattern.estimated_write_per_second.scale(0.05)
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# Minimal data footprint for connection metadata
|
|
88
|
+
relaxed.data_shape.estimated_state_size_gib = (
|
|
89
|
+
relaxed.data_shape.estimated_state_size_gib.scale(0.01)
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return relaxed
|
|
93
|
+
|
|
94
|
+
def _modify_postgres_desires(
|
|
95
|
+
user_desires: CapacityDesires,
|
|
96
|
+
) -> CapacityDesires:
|
|
97
|
+
relaxed = user_desires.model_copy(deep=True)
|
|
98
|
+
|
|
99
|
+
# Postgres doesn't support tier 0, so downgrade to tier 1
|
|
100
|
+
if relaxed.service_tier == 0:
|
|
101
|
+
relaxed.service_tier = 1
|
|
102
|
+
|
|
103
|
+
# Control caches reads in memory, only writes go to Postgres
|
|
104
|
+
# Set read QPS to minimal since Postgres only handles writes
|
|
81
105
|
if relaxed.query_pattern.estimated_read_per_second:
|
|
82
106
|
relaxed.query_pattern.estimated_read_per_second = certain_int(1)
|
|
83
107
|
|
|
84
108
|
return relaxed
|
|
85
109
|
|
|
86
|
-
return (
|
|
110
|
+
return (
|
|
111
|
+
("org.netflix.rds", _modify_rds_desires),
|
|
112
|
+
("org.netflix.postgres", _modify_postgres_desires),
|
|
113
|
+
)
|
|
87
114
|
|
|
88
115
|
@staticmethod
|
|
89
116
|
def default_desires(
|
|
@@ -30,6 +30,10 @@ class NflxEntityCapacityModel(CapacityModel):
|
|
|
30
30
|
desires: CapacityDesires,
|
|
31
31
|
extra_model_arguments: Dict[str, Any],
|
|
32
32
|
) -> Optional[CapacityPlan]:
|
|
33
|
+
# Entity doesn't support tier 0
|
|
34
|
+
if desires.service_tier == 0:
|
|
35
|
+
return None
|
|
36
|
+
|
|
33
37
|
# Entity wants 20GiB root volumes
|
|
34
38
|
extra_model_arguments.setdefault("root_disk_gib", 20)
|
|
35
39
|
|
|
@@ -59,7 +63,35 @@ class NflxEntityCapacityModel(CapacityModel):
|
|
|
59
63
|
def compose_with(
|
|
60
64
|
user_desires: CapacityDesires, extra_model_arguments: Dict[str, Any]
|
|
61
65
|
) -> Tuple[Tuple[str, Callable[[CapacityDesires], CapacityDesires]], ...]:
|
|
62
|
-
def
|
|
66
|
+
def _modify_rds_desires(
|
|
67
|
+
user_desires: CapacityDesires,
|
|
68
|
+
) -> CapacityDesires:
|
|
69
|
+
"""RDS proxy handles connection pooling and auth translation.
|
|
70
|
+
Capacity needs are much lower than the backend database."""
|
|
71
|
+
relaxed = user_desires.model_copy(deep=True)
|
|
72
|
+
|
|
73
|
+
# RDS doesn't support tier 0
|
|
74
|
+
if relaxed.service_tier == 0:
|
|
75
|
+
relaxed.service_tier = 1
|
|
76
|
+
|
|
77
|
+
# Proxy layer sees ~5% of actual load due to connection pooling
|
|
78
|
+
if relaxed.query_pattern.estimated_read_per_second:
|
|
79
|
+
relaxed.query_pattern.estimated_read_per_second = (
|
|
80
|
+
relaxed.query_pattern.estimated_read_per_second.scale(0.05)
|
|
81
|
+
)
|
|
82
|
+
if relaxed.query_pattern.estimated_write_per_second:
|
|
83
|
+
relaxed.query_pattern.estimated_write_per_second = (
|
|
84
|
+
relaxed.query_pattern.estimated_write_per_second.scale(0.05)
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# Proxy only needs to store connection metadata, not actual data
|
|
88
|
+
relaxed.data_shape.estimated_state_size_gib = (
|
|
89
|
+
relaxed.data_shape.estimated_state_size_gib.scale(0.01)
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return relaxed
|
|
93
|
+
|
|
94
|
+
def _modify_postgres_desires(
|
|
63
95
|
user_desires: CapacityDesires,
|
|
64
96
|
) -> CapacityDesires:
|
|
65
97
|
relaxed = user_desires.model_copy(deep=True)
|
|
@@ -96,7 +128,8 @@ class NflxEntityCapacityModel(CapacityModel):
|
|
|
96
128
|
return relaxed
|
|
97
129
|
|
|
98
130
|
return (
|
|
99
|
-
("org.netflix.
|
|
131
|
+
("org.netflix.rds", _modify_rds_desires),
|
|
132
|
+
("org.netflix.postgres", _modify_postgres_desires),
|
|
100
133
|
("org.netflix.key-value", lambda x: x),
|
|
101
134
|
("org.netflix.elasticsearch", _modify_elasticsearch_desires),
|
|
102
135
|
)
|
|
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
|
|
@@ -33,7 +33,6 @@ def models() -> Dict[str, Any]:
|
|
|
33
33
|
"org.netflix.counter": nflx_counter_capacity_model,
|
|
34
34
|
"org.netflix.zookeeper": nflx_zookeeper_capacity_model,
|
|
35
35
|
"org.netflix.evcache": nflx_evcache_capacity_model,
|
|
36
|
-
"org.netflix.rds": nflx_rds_capacity_model,
|
|
37
36
|
"org.netflix.elasticsearch": nflx_elasticsearch_capacity_model,
|
|
38
37
|
"org.netflix.elasticsearch.node": nflx_elasticsearch_data_capacity_model,
|
|
39
38
|
"org.netflix.elasticsearch.master": nflx_elasticsearch_master_capacity_model,
|
|
@@ -43,6 +42,7 @@ def models() -> Dict[str, Any]:
|
|
|
43
42
|
"org.netflix.cockroachdb": nflx_cockroachdb_capacity_model,
|
|
44
43
|
"org.netflix.aurora": nflx_aurora_capacity_model,
|
|
45
44
|
"org.netflix.postgres": nflx_postgres_capacity_model,
|
|
45
|
+
"org.netflix.rds": nflx_rds_capacity_model,
|
|
46
46
|
"org.netflix.kafka": nflx_kafka_capacity_model,
|
|
47
47
|
"org.netflix.dynamodb": nflx_ddb_capacity_model,
|
|
48
48
|
"org.netflix.wal": nflx_wal_capacity_model,
|
|
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.98 → service_capacity_modeling-0.3.100}/tests/test_arguments.py
RENAMED
|
File without changes
|
{service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_buffers.py
RENAMED
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_desire_merge.py
RENAMED
|
File without changes
|
{service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_enum_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_hardware.py
RENAMED
|
File without changes
|
{service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_hardware_shapes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_model_dump.py
RENAMED
|
File without changes
|
{service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_reproducible.py
RENAMED
|
File without changes
|
{service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_simulation.py
RENAMED
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.98 → service_capacity_modeling-0.3.100}/tests/test_working_set.py
RENAMED
|
File without changes
|