Hello,
I want to implement quota validation to ensure users or their groups/departments have sufficient quota before they can log in to use Gemini Image Generation or Veo.
The main requirements are:
- Check quota at login and prevent login if there is insufficient quota, with an appropriate error message.
- For logged-in users, check the remaining quota on every request to Gemini Image Generation or Veo APIs.
- Route all such API calls through an API Gateway to centralize quota validation.
- Store and check quota information in a database keyed by user or group/department.
- Update quota usage atomically to avoid race conditions.
Given these requirements and the Google Cloud environment, what would be the recommended best practice for implementing such quota checks? Specifically:
- Is it advisable to implement quota validation as a middleware/service behind the API Gateway?
- Should quota checks be integrated within the API Gateway policies or handled separately?
- Are there any recommended Google Cloud services or architectures to facilitate quota management and validation?
Any references to existing implementations or patterns would be greatly appreciated.
Thank you very much for your advice and guidance!
Best regards,
Raj
Hello,
I want to implement quota validation to ensure users or their groups/departments have sufficient quota before they can log in to use Gemini Image Generation or Veo.
The main requirements are:
Given these requirements and the Google Cloud environment, what would be the recommended best practice for implementing such quota checks? Specifically:
Any references to existing implementations or patterns would be greatly appreciated.
Thank you very much for your advice and guidance!
Best regards,
Raj