-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Group the services in a serverless NEG and put them all behind a load…
… balancer (#8)
- Loading branch information
Showing
7 changed files
with
470 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
output "backend" { | ||
value = google_compute_backend_service.backend.id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,306 @@ | ||
{ | ||
"displayName": "Cloud CDN", | ||
"mosaicLayout": { | ||
"columns": 12, | ||
"tiles": [ | ||
{ | ||
"height": 4, | ||
"widget": { | ||
"title": "Request Count by Continent", | ||
"xyChart": { | ||
"chartOptions": { | ||
"mode": "COLOR" | ||
}, | ||
"dataSets": [ | ||
{ | ||
"plotType": "STACKED_AREA", | ||
"timeSeriesQuery": { | ||
"timeSeriesQueryLanguage": "fetch https_lb_rule\n| metric 'loadbalancing.googleapis.com/https/request_count'\n| align rate(1m)\n| every 1m\n| group_by [metric.proxy_continent],\n [row_count: row_count()]" | ||
} | ||
} | ||
], | ||
"timeshiftDuration": "0s", | ||
"yAxis": { | ||
"scale": "LINEAR" | ||
} | ||
} | ||
}, | ||
"width": 6, | ||
"yPos": 8 | ||
}, | ||
{ | ||
"height": 4, | ||
"widget": { | ||
"title": "Cache Hit Response Bytes by Continent", | ||
"xyChart": { | ||
"chartOptions": { | ||
"mode": "COLOR" | ||
}, | ||
"dataSets": [ | ||
{ | ||
"plotType": "STACKED_BAR", | ||
"timeSeriesQuery": { | ||
"timeSeriesQueryLanguage": "fetch https_lb_rule\n| metric 'loadbalancing.googleapis.com/https/response_bytes_count'\n| filter (metric.cache_result = 'HIT')\n| align rate(1m)\n| every 1m\n| group_by [metric.proxy_continent],\n [value_response_bytes_count_aggregate:\n aggregate(value.response_bytes_count)]" | ||
} | ||
} | ||
], | ||
"timeshiftDuration": "0s", | ||
"yAxis": { | ||
"scale": "LINEAR" | ||
} | ||
} | ||
}, | ||
"width": 6, | ||
"xPos": 6, | ||
"yPos": 4 | ||
}, | ||
{ | ||
"height": 4, | ||
"widget": { | ||
"title": "Cache Status by Count", | ||
"xyChart": { | ||
"chartOptions": { | ||
"mode": "COLOR" | ||
}, | ||
"dataSets": [ | ||
{ | ||
"plotType": "LINE", | ||
"timeSeriesQuery": { | ||
"timeSeriesQueryLanguage": "fetch https_lb_rule\n| metric 'loadbalancing.googleapis.com/https/request_count'\n| align rate(1m)\n| every 1m\n| group_by [metric.cache_result],\n [row_count: row_count()]\n" | ||
} | ||
} | ||
], | ||
"timeshiftDuration": "0s", | ||
"yAxis": { | ||
"scale": "LINEAR" | ||
} | ||
} | ||
}, | ||
"width": 6, | ||
"yPos": 4 | ||
}, | ||
{ | ||
"height": 4, | ||
"widget": { | ||
"title": "Response Egress by Cache Status", | ||
"xyChart": { | ||
"chartOptions": { | ||
"mode": "COLOR" | ||
}, | ||
"dataSets": [ | ||
{ | ||
"plotType": "STACKED_AREA", | ||
"timeSeriesQuery": { | ||
"timeSeriesQueryLanguage": "fetch https_lb_rule\n| metric 'loadbalancing.googleapis.com/https/response_bytes_count'\n| align rate(1m)\n| every 1m\n| group_by [metric.cache_result],\n [value_response_bytes_count_aggregate:\n aggregate(value.response_bytes_count)]" | ||
} | ||
} | ||
], | ||
"timeshiftDuration": "0s", | ||
"yAxis": { | ||
"scale": "LINEAR" | ||
} | ||
} | ||
}, | ||
"width": 6, | ||
"xPos": 6 | ||
}, | ||
{ | ||
"height": 4, | ||
"widget": { | ||
"title": "Latency by Continent 95%", | ||
"xyChart": { | ||
"chartOptions": { | ||
"mode": "COLOR" | ||
}, | ||
"dataSets": [ | ||
{ | ||
"plotType": "LINE", | ||
"timeSeriesQuery": { | ||
"timeSeriesQueryLanguage": "fetch https_lb_rule\n| metric 'loadbalancing.googleapis.com/https/frontend_tcp_rtt'\n| group_by 1m,\n [value_frontend_tcp_rtt_aggregate: aggregate(value.frontend_tcp_rtt)]\n| every 1m\n| group_by [metric.proxy_continent],\n [value_frontend_tcp_rtt_aggregate_percentile:\n percentile(value_frontend_tcp_rtt_aggregate, 95)]" | ||
} | ||
} | ||
], | ||
"timeshiftDuration": "0s", | ||
"yAxis": { | ||
"scale": "LINEAR" | ||
} | ||
} | ||
}, | ||
"width": 6, | ||
"yPos": 12 | ||
}, | ||
{ | ||
"height": 4, | ||
"widget": { | ||
"title": "Client Response Code", | ||
"xyChart": { | ||
"chartOptions": { | ||
"mode": "COLOR" | ||
}, | ||
"dataSets": [ | ||
{ | ||
"plotType": "STACKED_AREA", | ||
"timeSeriesQuery": { | ||
"timeSeriesQueryLanguage": "fetch https_lb_rule\n| metric 'loadbalancing.googleapis.com/https/request_count'\n| group_by 1h, [row_count: row_count()]\n| every 1h\n| group_by [metric.response_code_class],\n [row_count_aggregate: aggregate(row_count)]" | ||
} | ||
} | ||
], | ||
"timeshiftDuration": "0s", | ||
"yAxis": { | ||
"scale": "LINEAR" | ||
} | ||
} | ||
}, | ||
"width": 6, | ||
"xPos": 6, | ||
"yPos": 8 | ||
}, | ||
{ | ||
"height": 4, | ||
"widget": { | ||
"title": "Non 2xx Error Codes", | ||
"xyChart": { | ||
"chartOptions": { | ||
"mode": "COLOR" | ||
}, | ||
"dataSets": [ | ||
{ | ||
"plotType": "STACKED_AREA", | ||
"timeSeriesQuery": { | ||
"timeSeriesQueryLanguage": "fetch https_lb_rule\n| metric 'loadbalancing.googleapis.com/https/request_count'\n| filter (metric.response_code_class != 200)\n| group_by 1h, [row_count: row_count()]\n| every 1h\n| group_by [metric.response_code_class],\n [row_count_aggregate: aggregate(row_count)]" | ||
} | ||
} | ||
], | ||
"timeshiftDuration": "0s", | ||
"yAxis": { | ||
"scale": "LINEAR" | ||
} | ||
} | ||
}, | ||
"width": 6, | ||
"xPos": 6, | ||
"yPos": 12 | ||
}, | ||
{ | ||
"height": 2, | ||
"widget": { | ||
"scorecard": { | ||
"timeSeriesQuery": { | ||
"timeSeriesFilter": { | ||
"aggregation": { | ||
"alignmentPeriod": "60s", | ||
"crossSeriesReducer": "REDUCE_SUM", | ||
"perSeriesAligner": "ALIGN_SUM" | ||
}, | ||
"filter": "metric.type=\"loadbalancing.googleapis.com/https/request_count\" resource.type=\"https_lb_rule\"" | ||
} | ||
} | ||
}, | ||
"title": "Total Requests" | ||
}, | ||
"width": 3 | ||
}, | ||
{ | ||
"height": 2, | ||
"widget": { | ||
"scorecard": { | ||
"timeSeriesQuery": { | ||
"timeSeriesFilter": { | ||
"aggregation": { | ||
"alignmentPeriod": "60s", | ||
"crossSeriesReducer": "REDUCE_SUM", | ||
"perSeriesAligner": "ALIGN_SUM" | ||
}, | ||
"filter": "metric.type=\"loadbalancing.googleapis.com/https/response_bytes_count\" resource.type=\"https_lb_rule\"" | ||
} | ||
} | ||
}, | ||
"title": "Total Egress" | ||
}, | ||
"width": 3, | ||
"xPos": 3 | ||
}, | ||
{ | ||
"height": 2, | ||
"widget": { | ||
"scorecard": { | ||
"timeSeriesQuery": { | ||
"timeSeriesFilter": { | ||
"aggregation": { | ||
"alignmentPeriod": "60s", | ||
"crossSeriesReducer": "REDUCE_SUM", | ||
"perSeriesAligner": "ALIGN_SUM" | ||
}, | ||
"filter": "metric.type=\"loadbalancing.googleapis.com/https/response_bytes_count\" resource.type=\"https_lb_rule\" metric.label.\"cache_result\"=\"HIT\"" | ||
} | ||
} | ||
}, | ||
"title": "Cache Hit Egress" | ||
}, | ||
"width": 3, | ||
"yPos": 2 | ||
}, | ||
{ | ||
"height": 2, | ||
"widget": { | ||
"scorecard": { | ||
"timeSeriesQuery": { | ||
"timeSeriesFilter": { | ||
"aggregation": { | ||
"alignmentPeriod": "60s", | ||
"crossSeriesReducer": "REDUCE_SUM", | ||
"perSeriesAligner": "ALIGN_SUM" | ||
}, | ||
"filter": "metric.type=\"loadbalancing.googleapis.com/https/response_bytes_count\" resource.type=\"https_lb_rule\" metric.label.\"cache_result\"=\"MISS\"" | ||
} | ||
} | ||
}, | ||
"title": "Cache Miss Egress" | ||
}, | ||
"width": 3, | ||
"xPos": 3, | ||
"yPos": 2 | ||
}, | ||
{ | ||
"height": 4, | ||
"widget": { | ||
"title": "Request Count by Country", | ||
"xyChart": { | ||
"chartOptions": { | ||
"mode": "COLOR" | ||
}, | ||
"dataSets": [ | ||
{ | ||
"minAlignmentPeriod": "60s", | ||
"plotType": "STACKED_AREA", | ||
"timeSeriesQuery": { | ||
"timeSeriesFilter": { | ||
"aggregation": { | ||
"alignmentPeriod": "60s", | ||
"perSeriesAligner": "ALIGN_RATE" | ||
}, | ||
"filter": "metric.type=\"loadbalancing.googleapis.com/https/request_count\" resource.type=\"https_lb_rule\"", | ||
"secondaryAggregation": { | ||
"alignmentPeriod": "60s", | ||
"crossSeriesReducer": "REDUCE_SUM", | ||
"groupByFields": [ | ||
"metric.label.\"client_country\"" | ||
], | ||
"perSeriesAligner": "ALIGN_SUM" | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"timeshiftDuration": "0s", | ||
"yAxis": { | ||
"scale": "LINEAR" | ||
} | ||
} | ||
}, | ||
"width": 6, | ||
"yPos": 16 | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.