Skip to content

Commit 652c19c

Browse files
authored
Updates for javabuilder-demo to go live (#393)
* update limit and change alert description * try using version 2.7.5 * try using version 2.7.8 * add dev config * update alarm config * add whitespace * commas * try parens * hard-code limits * add period * temporarily change config for testing * change back to demo config * increase provisioned executions * remove dev config * switch to parameters * fix linting errors * add quotes * revert dev config change
1 parent 22c962a commit 652c19c

File tree

5 files changed

+28
-12
lines changed

5 files changed

+28
-12
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.7
1+
2.7.8

cicd/3-app/javabuilder/config/production-demo.config.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
"BaseDomainName": "code.org",
44
"SubdomainName": "javabuilder-demo",
55
"BaseDomainNameHostedZonedID": "Z2LCOI49SCXUGU",
6-
"ProvisionedConcurrentExecutions": "1",
7-
"ReservedConcurrentExecutions": "5",
6+
"ProvisionedConcurrentExecutions": "5",
7+
"ReservedConcurrentExecutions": "50",
88
"LimitPerHour": "-1",
99
"LimitPerDay": "50",
10-
"SilenceAlerts": "false"
10+
"SilenceAlerts": "false",
11+
"HighConcurrentExecutionsTopic": "javabuilder-low-urgency",
12+
"HighConcurrentExecutionsAlarmThreshold": "45"
13+
1114
},
1215
"Tags": {
1316
"EnvType": "production"

cicd/3-app/javabuilder/config/production.config.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"LimitPerHour": "1000",
88
"LimitPerDay": "-1",
99
"SilenceAlerts": "false",
10-
"TeacherLimitPerHour": "25000"
10+
"TeacherLimitPerHour": "25000",
11+
"HighConcurrentExecutionsTopic": "CDO-Urgent",
12+
"HighConcurrentExecutionsAlarmThreshold": "400"
1113
},
1214
"Tags" : {
1315
"EnvType" : "production"

cicd/3-app/javabuilder/config/test.config.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"ReservedConcurrentExecutions": "25",
77
"LimitPerHour": "50",
88
"LimitPerDay": "150",
9-
"SilenceAlerts": "false"
9+
"SilenceAlerts": "false",
10+
"HighConcurrentExecutionsTopic": "javabuilder-low-urgency",
11+
"HighConcurrentExecutionsAlarmThreshold": "20"
1012
},
1113
"Tags" : {
1214
"EnvType" : "test"

cicd/3-app/javabuilder/template.yml.erb

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ Parameters:
4848
AllowedValues: [true, false]
4949
Description: If alerts should be silenced on this instance
5050
Default: false
51+
HighConcurrentExecutionsTopic:
52+
Type: String
53+
Description: The name of the SNS topic to publish to for a high concurrent executions alarm.
54+
Default: CDO-Urgent
55+
HighConcurrentExecutionsAlarmThreshold:
56+
Type: Number
57+
Description: The threshold for the high concurrent executions alarm.
58+
Default: 400
5159
<%
5260
JAVALAB_APP_TYPES = %w(
5361
Theater
@@ -857,18 +865,19 @@ Resources:
857865
Properties:
858866
AlarmName: !Sub "${SubdomainName}_<%=name.downcase%>_high_concurrent_executions"
859867
AlarmDescription: !Sub |
860-
Alarm if javabuilder usage exceeds 400 concurrent
861-
executions for 10 minutes. Occasional spikes are expected, but
862-
long-running high usage is an indication of an attack. Page the student learning
863-
team for further investigation. See this doc for investigation steps
868+
Alarm if javabuilder usage has high concurrent executions for 10 minutes.
869+
Occasional spikes are expected, but long-running high usage is an indication
870+
of an attack. If this is occuring on the demo environment, this is a non-urgent
871+
issue as we expect occasional periods of high usage. If it is on production,
872+
page the student learning team for further investigation. See this doc for investigation steps
864873
https://docs.google.com/document/d/1bHvV6pvUcwxgZpw0YWBmxFggQL5KqYx9zwolwkZhjU8/edit#bookmark=id.xs1gcuxrw6ze
865874
ActionsEnabled: true
866875
AlarmActions:
867-
- !If [SilenceAlertsCondition, !Ref AWS::NoValue, !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:CDO-Urgent"]
876+
- !If [SilenceAlertsCondition, !Ref AWS::NoValue, !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:${HighConcurrentExecutionsTopic}"]
868877
EvaluationPeriods: 10
869878
DatapointsToAlarm: 10
870879
Period: 60
871-
Threshold: 400
880+
Threshold: !Ref HighConcurrentExecutionsAlarmThreshold
872881
ComparisonOperator: GreaterThanThreshold
873882
TreatMissingData: notBreaching
874883
MetricName: ConcurrentExecutions

0 commit comments

Comments
 (0)