Skip to Content
SimulatorsResendRate limits and test reads

Simulators

Rate limits and test reads

Your app’s requests share one fixed window of 10 requests per second on the wall clock, and each response to them has the rate-limit headers. rystic compose inbox and rystic compose signin mark their reads as a test’s, so those reads don’t spend your app’s allowance. On a simulator started without RYSTIC_ADMIN_TOKEN, the mark is the X-Rystic-Operator header, and it is for a test’s own requests, not your app’s.

Send ten marked reads, then one unmarked read. Its ratelimit-remaining is 9, so the marked reads were not counted. An unmarked read’s response has four rate-limit headers, and a marked read’s has none:

for i in 1 2 3 4 5 6 7 8 9 10; do curl -s -o /dev/null "$RYSTIC_URL/emails" -H 'Authorization: Bearer re_placeholder' -H 'X-Rystic-Operator: 1'; done
curl -s -D - -o /dev/null "$RYSTIC_URL/emails" -H 'Authorization: Bearer re_placeholder' | awk 'tolower($0) ~ /^ratelimit-remaining:/ {gsub("\r", ""); print $2}'
# -> 9
curl -s -D - -o /dev/null "$RYSTIC_URL/emails" -H 'Authorization: Bearer re_placeholder' | awk 'tolower($0) ~ /^ratelimit-/ {n++} END {print n+0}'
# -> 4
curl -s -D - -o /dev/null "$RYSTIC_URL/emails" -H 'Authorization: Bearer re_placeholder' -H 'X-Rystic-Operator: 1' | awk 'tolower($0) ~ /^ratelimit-/ {n++} END {print n+0}'
# -> 0
Last updated on