service-capacity-modeling 0.3.99__py3-none-any.whl → 0.3.100__py3-none-any.whl
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/models/org/netflix/__init__.py +1 -1
- service_capacity_modeling/models/org/netflix/aurora.py +1 -1
- service_capacity_modeling/models/org/netflix/control.py +32 -5
- service_capacity_modeling/models/org/netflix/entity.py +35 -2
- {service_capacity_modeling-0.3.99.dist-info → service_capacity_modeling-0.3.100.dist-info}/METADATA +1 -1
- {service_capacity_modeling-0.3.99.dist-info → service_capacity_modeling-0.3.100.dist-info}/RECORD +10 -10
- {service_capacity_modeling-0.3.99.dist-info → service_capacity_modeling-0.3.100.dist-info}/WHEEL +0 -0
- {service_capacity_modeling-0.3.99.dist-info → service_capacity_modeling-0.3.100.dist-info}/entry_points.txt +0 -0
- {service_capacity_modeling-0.3.99.dist-info → service_capacity_modeling-0.3.100.dist-info}/licenses/LICENSE +0 -0
- {service_capacity_modeling-0.3.99.dist-info → service_capacity_modeling-0.3.100.dist-info}/top_level.txt +0 -0
|
@@ -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,
|
|
@@ -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
|
)
|
{service_capacity_modeling-0.3.99.dist-info → service_capacity_modeling-0.3.100.dist-info}/RECORD
RENAMED
|
@@ -56,15 +56,15 @@ service_capacity_modeling/models/common.py,sha256=Bs-G1eHrb9qmS9qEWzx0rzN9QjQ419
|
|
|
56
56
|
service_capacity_modeling/models/headroom_strategy.py,sha256=rGo_d7nxkQDjx0_hIAXKKZAWnQDBtqZhc0eTMouVh8s,682
|
|
57
57
|
service_capacity_modeling/models/utils.py,sha256=WosEEg4o1_WSbTb5mL-M1v8JuWJgvS2oWvnDS3qNz3k,2662
|
|
58
58
|
service_capacity_modeling/models/org/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
|
-
service_capacity_modeling/models/org/netflix/__init__.py,sha256=
|
|
60
|
-
service_capacity_modeling/models/org/netflix/aurora.py,sha256=
|
|
59
|
+
service_capacity_modeling/models/org/netflix/__init__.py,sha256=keaBt7dk6DB2VuRINdo8wRfsobK655Gfw3hYjruacJs,2553
|
|
60
|
+
service_capacity_modeling/models/org/netflix/aurora.py,sha256=ZCileXosW1A8D9QfPf8mCu1BIt4xKvzGdqU5iW487Jg,13076
|
|
61
61
|
service_capacity_modeling/models/org/netflix/cassandra.py,sha256=6CV0UIWpK0lcfF9_-LGrUjDomysswCvoMYS3S-wpSOU,39627
|
|
62
|
-
service_capacity_modeling/models/org/netflix/control.py,sha256
|
|
62
|
+
service_capacity_modeling/models/org/netflix/control.py,sha256=-MqVCtr528vCElMAInFucX-NjsnERd4cot-mYDncbZg,6813
|
|
63
63
|
service_capacity_modeling/models/org/netflix/counter.py,sha256=kTDL7dCnkn-XU27_Z1VBc4CCLCPoOqJZe9WgcENHHd4,10517
|
|
64
64
|
service_capacity_modeling/models/org/netflix/crdb.py,sha256=iW7tyG8jpXhHIdXrw3DPYSHRAknPN42MlCRLJO4o9C8,20826
|
|
65
65
|
service_capacity_modeling/models/org/netflix/ddb.py,sha256=9qRiuTqWev9zbYFFzewyowU7M41uALsuLklYx20yAXw,26502
|
|
66
66
|
service_capacity_modeling/models/org/netflix/elasticsearch.py,sha256=zPrC6b2LNrAh3IWE3HCMUEYASacjYbHChbO4WZSMma4,25234
|
|
67
|
-
service_capacity_modeling/models/org/netflix/entity.py,sha256=
|
|
67
|
+
service_capacity_modeling/models/org/netflix/entity.py,sha256=bL_7UcHb-E7zxbjmy1a1whMfYc4sRdvIL96B_aVs1hE,10139
|
|
68
68
|
service_capacity_modeling/models/org/netflix/evcache.py,sha256=BDVRWely3F_3Ecb3Um3dQ024_I6XgvagpRJ6zdP5E18,25687
|
|
69
69
|
service_capacity_modeling/models/org/netflix/graphkv.py,sha256=7ncEhx9lLsN_vGIKNHkvWfDdKffG7cYe91Wr-DB7IjU,8659
|
|
70
70
|
service_capacity_modeling/models/org/netflix/iso_date_math.py,sha256=oC5sgIXDqwOp6-5z2bdTkm-bJLlnzhqcONI_tspHjac,1137
|
|
@@ -82,9 +82,9 @@ service_capacity_modeling/tools/auto_shape.py,sha256=K248-DayPrcZwLw1dYr47lpeQQw
|
|
|
82
82
|
service_capacity_modeling/tools/fetch_pricing.py,sha256=fO84h77cqiiIHF4hZt490RwbZ6JqjB45UsnPpV2AXD4,6122
|
|
83
83
|
service_capacity_modeling/tools/generate_missing.py,sha256=F7YqvMJAV4nZc20GNrlIsnQSF8_77sLgwYZqc5k4LDg,3099
|
|
84
84
|
service_capacity_modeling/tools/instance_families.py,sha256=e5RuYkCLUITvsAazDH12B6KjX_PaBsv6Ne3mj0HK_sQ,9223
|
|
85
|
-
service_capacity_modeling-0.3.
|
|
86
|
-
service_capacity_modeling-0.3.
|
|
87
|
-
service_capacity_modeling-0.3.
|
|
88
|
-
service_capacity_modeling-0.3.
|
|
89
|
-
service_capacity_modeling-0.3.
|
|
90
|
-
service_capacity_modeling-0.3.
|
|
85
|
+
service_capacity_modeling-0.3.100.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
|
|
86
|
+
service_capacity_modeling-0.3.100.dist-info/METADATA,sha256=LF_RV_duMAiGaOc7BX7jDNBjizo2BRtOX-cZtWLPYzw,10367
|
|
87
|
+
service_capacity_modeling-0.3.100.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
88
|
+
service_capacity_modeling-0.3.100.dist-info/entry_points.txt,sha256=ZsjzpG5SomWpT1zCE19n1uSXKH2gTI_yc33sdl0vmJg,146
|
|
89
|
+
service_capacity_modeling-0.3.100.dist-info/top_level.txt,sha256=H8XjTCLgR3enHq5t3bIbxt9SeUkUT8HT_SDv2dgIT_A,26
|
|
90
|
+
service_capacity_modeling-0.3.100.dist-info/RECORD,,
|
{service_capacity_modeling-0.3.99.dist-info → service_capacity_modeling-0.3.100.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|