Skip to content

Commit 768e878

Browse files
authored
Update hourly user limit and silence classroom limit (#368)
* update hourly limits and remove classroom limit * update limits
1 parent 75791c3 commit 768e878

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"BaseDomainNameHostedZonedID": "Z2LCOI49SCXUGU",
55
"ProvisionedConcurrentExecutions": "150",
66
"ReservedConcurrentExecutions": "1650",
7-
"LimitPerHour": "150",
8-
"LimitPerDay": "300",
7+
"LimitPerHour": "1000",
8+
"LimitPerDay": "5000",
99
"SilenceAlerts": "false"
1010
},
1111
"Tags" : {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Parameters:
3838
Type: Number
3939
Description: The number of Javabuilder invocations allowed for all students in a classroom per hour.
4040
MinValue: 1
41-
Default: 1000
41+
Default: 5000
4242
StageName:
4343
Type: String
4444
Description: The default stage name in the API Gateway APIs

javabuilder-authorizer/token_validator.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@ def validate
2626
# TODO: uncomment other throttling thresholds once we have fine-tuned those limits
2727
return error(TOKEN_USED) unless log_token
2828
return error(USER_BLOCKED) if user_blocked?
29-
return error(CLASSROOM_BLOCKED) if teachers_blocked?
29+
# return error(CLASSROOM_BLOCKED) if teachers_blocked?
3030
hourly_usage_response = user_usage(ONE_HOUR_SECONDS)
3131
return error(USER_BLOCKED) if user_over_hourly_limit?(hourly_usage_response)
3232
# return error(USER_BLOCKED) if user_over_daily_limit?
33-
return error(CLASSROOM_BLOCKED) if teachers_over_hourly_limit?
33+
# return error(CLASSROOM_BLOCKED) if teachers_over_hourly_limit?
34+
35+
# for now, check and log if the teacher is over the hourly limit, but still
36+
# allow those users through until we fine tune the limit
37+
teachers_over_hourly_limit?
38+
3439

3540
near_limit_detail = get_user_near_hourly_limit_detail(hourly_usage_response.count)
3641
log_requests

0 commit comments

Comments
 (0)