service-capacity-modeling 0.3.45__py3-none-any.whl → 0.3.47__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.
Potentially problematic release.
This version of service-capacity-modeling might be problematic. Click here for more details.
- service_capacity_modeling/models/org/netflix/kafka.py +15 -6
- {service_capacity_modeling-0.3.45.dist-info → service_capacity_modeling-0.3.47.dist-info}/METADATA +1 -1
- {service_capacity_modeling-0.3.45.dist-info → service_capacity_modeling-0.3.47.dist-info}/RECORD +7 -7
- {service_capacity_modeling-0.3.45.dist-info → service_capacity_modeling-0.3.47.dist-info}/WHEEL +1 -1
- {service_capacity_modeling-0.3.45.dist-info → service_capacity_modeling-0.3.47.dist-info}/entry_points.txt +0 -0
- {service_capacity_modeling-0.3.45.dist-info → service_capacity_modeling-0.3.47.dist-info}/licenses/LICENSE +0 -0
- {service_capacity_modeling-0.3.45.dist-info → service_capacity_modeling-0.3.47.dist-info}/top_level.txt +0 -0
|
@@ -159,7 +159,7 @@ def _estimate_kafka_requirement( # pylint: disable=too-many-positional-argument
|
|
|
159
159
|
needed_network_mbps = max(bw_in, bw_out) * 1.40
|
|
160
160
|
|
|
161
161
|
needed_disk = math.ceil(
|
|
162
|
-
desires.data_shape.estimated_state_size_gib.mid
|
|
162
|
+
desires.data_shape.estimated_state_size_gib.mid,
|
|
163
163
|
)
|
|
164
164
|
|
|
165
165
|
# Keep the last N seconds hot in cache
|
|
@@ -416,6 +416,10 @@ class NflxKafkaArguments(BaseModel):
|
|
|
416
416
|
|
|
417
417
|
|
|
418
418
|
class NflxKafkaCapacityModel(CapacityModel):
|
|
419
|
+
|
|
420
|
+
HA_DEFAULT_REPLICATION_FACTOR = 2
|
|
421
|
+
SC_DEFAULT_REPLICATION_FACTOR = 3
|
|
422
|
+
|
|
419
423
|
@staticmethod
|
|
420
424
|
def capacity_plan(
|
|
421
425
|
instance: Instance,
|
|
@@ -427,11 +431,11 @@ class NflxKafkaCapacityModel(CapacityModel):
|
|
|
427
431
|
cluster_type: ClusterType = ClusterType(
|
|
428
432
|
extra_model_arguments.get("cluster_type", "high-availability")
|
|
429
433
|
)
|
|
430
|
-
|
|
434
|
+
replication_factor = NflxKafkaCapacityModel.HA_DEFAULT_REPLICATION_FACTOR
|
|
431
435
|
if cluster_type == ClusterType.strong:
|
|
432
|
-
|
|
436
|
+
replication_factor = NflxKafkaCapacityModel.SC_DEFAULT_REPLICATION_FACTOR
|
|
433
437
|
copies_per_region: int = extra_model_arguments.get(
|
|
434
|
-
"copies_per_region",
|
|
438
|
+
"copies_per_region", replication_factor
|
|
435
439
|
)
|
|
436
440
|
if cluster_type == ClusterType.strong and copies_per_region < 3:
|
|
437
441
|
raise ValueError("Strong consistency and RF<3 doesn't work")
|
|
@@ -503,8 +507,13 @@ class NflxKafkaCapacityModel(CapacityModel):
|
|
|
503
507
|
retention = extra_model_arguments.get("retention", "PT8H")
|
|
504
508
|
retention_secs = iso_to_seconds(retention)
|
|
505
509
|
|
|
506
|
-
# write throughput * retention = usage
|
|
507
|
-
|
|
510
|
+
# write throughput * retention * replication factor = usage
|
|
511
|
+
replication_factor = NflxKafkaCapacityModel.HA_DEFAULT_REPLICATION_FACTOR
|
|
512
|
+
if extra_model_arguments.get("cluster_type", None) == ClusterType.strong:
|
|
513
|
+
replication_factor = NflxKafkaCapacityModel.SC_DEFAULT_REPLICATION_FACTOR
|
|
514
|
+
state_gib = (
|
|
515
|
+
write_bytes.mid * retention_secs * replication_factor
|
|
516
|
+
) / GIB_IN_BYTES
|
|
508
517
|
|
|
509
518
|
return CapacityDesires(
|
|
510
519
|
query_pattern=QueryPattern(
|
{service_capacity_modeling-0.3.45.dist-info → service_capacity_modeling-0.3.47.dist-info}/RECORD
RENAMED
|
@@ -55,7 +55,7 @@ service_capacity_modeling/models/org/netflix/entity.py,sha256=M0vzwhf8UAbVxnXspA
|
|
|
55
55
|
service_capacity_modeling/models/org/netflix/evcache.py,sha256=Po2U7pxQ5Mdr9ZtIUGdzUL5Dk67l0SZdxF_lZH7fVFQ,25281
|
|
56
56
|
service_capacity_modeling/models/org/netflix/graphkv.py,sha256=EVRo-1OCDvvotqPgIdP2_JXMfZUsG7KZxRMmlgYc3CI,8558
|
|
57
57
|
service_capacity_modeling/models/org/netflix/iso_date_math.py,sha256=CPGHLmbGeNqkcYcmCkLKhPZcAU-yTJ2HjvuXdnNyCYc,996
|
|
58
|
-
service_capacity_modeling/models/org/netflix/kafka.py,sha256=
|
|
58
|
+
service_capacity_modeling/models/org/netflix/kafka.py,sha256=1at-i6puDbCu8zPHflnJLhilauMT6nWeg3OvBdL3ksw,21560
|
|
59
59
|
service_capacity_modeling/models/org/netflix/key_value.py,sha256=yL5moU0SJD4ocBU9zeGhPYE4KY7oSSq5yqfVWd_Ot2g,9336
|
|
60
60
|
service_capacity_modeling/models/org/netflix/postgres.py,sha256=R3Tog-ZW1Yx6gO3AKqI_wquSm30s01QX9yWR7Jvgk9A,4055
|
|
61
61
|
service_capacity_modeling/models/org/netflix/rds.py,sha256=z9egFBg4Ltqyuz_WHk-_hw-xL-EQNzl1JopJoWdNli8,10768
|
|
@@ -69,9 +69,9 @@ service_capacity_modeling/tools/auto_shape.py,sha256=Rk5Fjrw2susVL8It_J2KUADoMGB
|
|
|
69
69
|
service_capacity_modeling/tools/fetch_pricing.py,sha256=SHOtFaPr61op2bnY9i_g_1-d-Nz2rV8c7Jwsye2R49s,3763
|
|
70
70
|
service_capacity_modeling/tools/generate_missing.py,sha256=WN7Y0iPjelJu9d2Yq5dcu_EBIQPX2VxKgOou4NMNOM4,2860
|
|
71
71
|
service_capacity_modeling/tools/instance_families.py,sha256=e9JWSIdljSmHI8Nb2MI5Ld9JqQ7WdOtPtV7g3oR7ZiU,7764
|
|
72
|
-
service_capacity_modeling-0.3.
|
|
73
|
-
service_capacity_modeling-0.3.
|
|
74
|
-
service_capacity_modeling-0.3.
|
|
75
|
-
service_capacity_modeling-0.3.
|
|
76
|
-
service_capacity_modeling-0.3.
|
|
77
|
-
service_capacity_modeling-0.3.
|
|
72
|
+
service_capacity_modeling-0.3.47.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
|
|
73
|
+
service_capacity_modeling-0.3.47.dist-info/METADATA,sha256=-eb5R8vZPpKGxj5VfHrbzxZ0diXttHL-ejqxWZf5Ba8,9590
|
|
74
|
+
service_capacity_modeling-0.3.47.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
75
|
+
service_capacity_modeling-0.3.47.dist-info/entry_points.txt,sha256=ZsjzpG5SomWpT1zCE19n1uSXKH2gTI_yc33sdl0vmJg,146
|
|
76
|
+
service_capacity_modeling-0.3.47.dist-info/top_level.txt,sha256=H8XjTCLgR3enHq5t3bIbxt9SeUkUT8HT_SDv2dgIT_A,26
|
|
77
|
+
service_capacity_modeling-0.3.47.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|