diff --git a/.ruby-version b/.ruby-version index 1f7da99d..6a81b4c8 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.7 +2.7.8 diff --git a/cicd/3-app/javabuilder/config/production-demo.config.json b/cicd/3-app/javabuilder/config/production-demo.config.json index d37b21cf..c5f46bd6 100644 --- a/cicd/3-app/javabuilder/config/production-demo.config.json +++ b/cicd/3-app/javabuilder/config/production-demo.config.json @@ -3,11 +3,14 @@ "BaseDomainName": "code.org", "SubdomainName": "javabuilder-demo", "BaseDomainNameHostedZonedID": "Z2LCOI49SCXUGU", - "ProvisionedConcurrentExecutions": "1", - "ReservedConcurrentExecutions": "5", + "ProvisionedConcurrentExecutions": "5", + "ReservedConcurrentExecutions": "50", "LimitPerHour": "-1", "LimitPerDay": "50", - "SilenceAlerts": "false" + "SilenceAlerts": "false", + "HighConcurrentExecutionsTopic": "javabuilder-low-urgency", + "HighConcurrentExecutionsAlarmThreshold": "45" + }, "Tags": { "EnvType": "production" diff --git a/cicd/3-app/javabuilder/config/production.config.json b/cicd/3-app/javabuilder/config/production.config.json index 50bcfde5..dd723318 100644 --- a/cicd/3-app/javabuilder/config/production.config.json +++ b/cicd/3-app/javabuilder/config/production.config.json @@ -7,7 +7,9 @@ "LimitPerHour": "1000", "LimitPerDay": "-1", "SilenceAlerts": "false", - "TeacherLimitPerHour": "25000" + "TeacherLimitPerHour": "25000", + "HighConcurrentExecutionsTopic": "CDO-Urgent", + "HighConcurrentExecutionsAlarmThreshold": "400" }, "Tags" : { "EnvType" : "production" diff --git a/cicd/3-app/javabuilder/config/test.config.json b/cicd/3-app/javabuilder/config/test.config.json index 79055fa7..58964c8f 100644 --- a/cicd/3-app/javabuilder/config/test.config.json +++ b/cicd/3-app/javabuilder/config/test.config.json @@ -6,7 +6,9 @@ "ReservedConcurrentExecutions": "25", "LimitPerHour": "50", "LimitPerDay": "150", - "SilenceAlerts": "false" + "SilenceAlerts": "false", + "HighConcurrentExecutionsTopic": "javabuilder-low-urgency", + "HighConcurrentExecutionsAlarmThreshold": "20" }, "Tags" : { "EnvType" : "test" diff --git a/cicd/3-app/javabuilder/template.yml.erb b/cicd/3-app/javabuilder/template.yml.erb index 3a54d82e..9cb765df 100644 --- a/cicd/3-app/javabuilder/template.yml.erb +++ b/cicd/3-app/javabuilder/template.yml.erb @@ -48,6 +48,14 @@ Parameters: AllowedValues: [true, false] Description: If alerts should be silenced on this instance Default: false + HighConcurrentExecutionsTopic: + Type: String + Description: The name of the SNS topic to publish to for a high concurrent executions alarm. + Default: CDO-Urgent + HighConcurrentExecutionsAlarmThreshold: + Type: Number + Description: The threshold for the high concurrent executions alarm. + Default: 400 <% JAVALAB_APP_TYPES = %w( Theater @@ -857,18 +865,19 @@ Resources: Properties: AlarmName: !Sub "${SubdomainName}_<%=name.downcase%>_high_concurrent_executions" AlarmDescription: !Sub | - Alarm if javabuilder usage exceeds 400 concurrent - executions for 10 minutes. Occasional spikes are expected, but - long-running high usage is an indication of an attack. Page the student learning - team for further investigation. See this doc for investigation steps + Alarm if javabuilder usage has high concurrent executions for 10 minutes. + Occasional spikes are expected, but long-running high usage is an indication + of an attack. If this is occuring on the demo environment, this is a non-urgent + issue as we expect occasional periods of high usage. If it is on production, + page the student learning team for further investigation. See this doc for investigation steps https://docs.google.com/document/d/1bHvV6pvUcwxgZpw0YWBmxFggQL5KqYx9zwolwkZhjU8/edit#bookmark=id.xs1gcuxrw6ze ActionsEnabled: true AlarmActions: - - !If [SilenceAlertsCondition, !Ref AWS::NoValue, !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:CDO-Urgent"] + - !If [SilenceAlertsCondition, !Ref AWS::NoValue, !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:${HighConcurrentExecutionsTopic}"] EvaluationPeriods: 10 DatapointsToAlarm: 10 Period: 60 - Threshold: 400 + Threshold: !Ref HighConcurrentExecutionsAlarmThreshold ComparisonOperator: GreaterThanThreshold TreatMissingData: notBreaching MetricName: ConcurrentExecutions