How would you design a scalable API gateway that handles rate-limiting and authentication for millions of requests for TensorIoT client workloads?