Design a rate limiter that supports both sliding window and token bucket strategies, configurable per-tenant
Implement RateLimiter.check(tenantId, key) that returns { allowed, retryAfterMs }. The limiter must handle 50k QPS with sub-5ms p99 latency. Consider Redis vs in-memory, replication, and clock skew.