Skip to content

Commit

Permalink
[forge][chaos] five regions
Browse files Browse the repository at this point in the history
  • Loading branch information
ibalajiarun committed Oct 3, 2024
1 parent 6140801 commit 2295e21
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
31 changes: 31 additions & 0 deletions testsuite/testcases/src/data/five_region_link_stats.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
sending_region,receiving_region,bitrate_bps,avgrtt
gcp--us-central1,aws--eu-west-1,300000000,103.435
gcp--us-central1,aws--ap-northeast-1,300000000,133.996
gcp--us-central1,aws--sa-east-1,300000000,145.483
gcp--us-central1,gcp--as-southeast-1,300000000,195.763
gcp--us-central1,gcp--eu-north1,300000000,
aws--sa-east-1,gcp--us-central1,300000000,145.703
aws--sa-east-1,aws--eu-west-1,300000000,176.894
aws--sa-east-1,aws--ap-northeast-1,300000000,255.289
aws--sa-east-1,gcp--as-southeast-1,300000000,329.213
aws--sa-east-1,gcp--eu-north1,300000000,
aws--eu-west-1,gcp--us-central1,300000000,104.169
aws--eu-west-1,aws--sa-east-1,300000000,176.813
aws--eu-west-1,aws--ap-northeast-1,300000000,198.555
aws--eu-west-1,gcp--as-southeast-1,300000000,211.419
aws--eu-west-1,gcp--eu-north1,300000000,
aws--ap-northeast-1,gcp--us-central1,300000000,128.999
aws--ap-northeast-1,aws--eu-west-1,300000000,198.539
aws--ap-northeast-1,aws--sa-east-1,300000000,255.323
aws--ap-northeast-1,gcp--as-southeast-1,300000000,72.837
aws--ap-northeast-1,gcp--eu-north1,300000000,
gcp--as-southeast-1,gcp--us-central1,300000000,195.763
gcp--as-southeast-1,aws--sa-east-1,300000000,329.213
gcp--as-southeast-1,aws--eu-west-1,300000000,211.419
gcp--as-southeast-1,aws--ap-northeast-1,300000000,72.837
gcp--as-southeast-1,gcp--eu-north1,300000000,
gcp--eu-north1,gcp--us-central1,300000000,126.423
gcp--eu-north1,aws--sa-east-1,300000000,216.578
gcp--eu-north1,aws--eu-west-1,300000000,48.249
gcp--eu-north1,aws--ap-northeast-1,300000000,250.730
gcp--eu-north1,gcp--as-southeast-1,300000000,222.910
10 changes: 9 additions & 1 deletion testsuite/testcases/src/data/four_region_link_stats.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@ sending_region,receiving_region,bitrate_bps,avgrtt
gcp--us-central1,aws--eu-west-1,300000000,103.435
gcp--us-central1,aws--ap-northeast-1,300000000,133.996
gcp--us-central1,aws--sa-east-1,300000000,145.483
gcp--us-central1,gcp--as-southeast-1,300000000,195.763
aws--sa-east-1,gcp--us-central1,300000000,145.703
aws--sa-east-1,aws--eu-west-1,300000000,176.894
aws--sa-east-1,aws--ap-northeast-1,300000000,255.289
aws--sa-east-1,gcp--as-southeast-1,300000000,329.213
aws--eu-west-1,gcp--us-central1,300000000,104.169
aws--eu-west-1,aws--sa-east-1,300000000,176.813
aws--eu-west-1,aws--ap-northeast-1,300000000,198.555
aws--eu-west-1,gcp--as-southeast-1,300000000,211.419
aws--ap-northeast-1,gcp--us-central1,300000000,128.999
aws--ap-northeast-1,aws--eu-west-1,300000000,198.539
aws--ap-northeast-1,aws--sa-east-1,300000000,255.323
aws--ap-northeast-1,aws--sa-east-1,300000000,255.323
aws--ap-northeast-1,gcp--as-southeast-1,300000000,72.837
gcp--as-southeast-1,gcp--us-central1,300000000,195.763
gcp--as-southeast-1,aws--sa-east-1,300000000,329.213
gcp--as-southeast-1,aws--eu-west-1,300000000,211.419
gcp--as-southeast-1,aws--ap-northeast-1,300000000,72.837
11 changes: 6 additions & 5 deletions testsuite/testcases/src/multi_region_network_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use std::{collections::BTreeMap, sync::Arc};
/// is measuring TCP bandwidth only which is primarily affected by RTT, and not the actual bandwidth
/// across the regions, which would vary according to competing traffic, etc.
const FOUR_REGION_LINK_STATS: &[u8] = include_bytes!("data/four_region_link_stats.csv");
const FIVE_REGION_LINK_STATS: &[u8] = include_bytes!("data/five_region_link_stats.csv");
/// The two regions were chosen as the most distant regions among the four regions set.
const TWO_REGION_LINK_STATS: &[u8] = include_bytes!("data/two_region_link_stats.csv");

Expand Down Expand Up @@ -78,10 +79,10 @@ fn create_link_stats_table_with_peer_groups(
number_of_regions >= 2,
"At least 2 regions are required for inter-region network chaos."
);
assert!(
number_of_regions <= 4,
"ChaosMesh only supports simulating up to 4 regions."
);
// assert!(
// number_of_regions <= 4,
// "ChaosMesh only supports simulating up to 4 regions."
// );

// Create the link stats table with peer groups
let peer_chunks = chunk_peers(peers, number_of_regions);
Expand Down Expand Up @@ -223,7 +224,7 @@ pub struct MultiRegionNetworkEmulationConfig {
impl Default for MultiRegionNetworkEmulationConfig {
fn default() -> Self {
Self {
link_stats_table: get_link_stats_table(FOUR_REGION_LINK_STATS),
link_stats_table: get_link_stats_table(FIVE_REGION_LINK_STATS),
inter_region_config: InterRegionNetEmConfig::default(),
intra_region_config: Some(IntraRegionNetEmConfig::default()),
}
Expand Down

0 comments on commit 2295e21

Please sign in to comment.