Notification APIs (gmail seems to have them)
If you're looking for quick updates with minimal latency, consider using alternative methods such as "long polling" or "web sockets." These techniques are ideal for real-time applications like chat services, online games, auctions, and ticket/order queues where lag is not acceptable.
Gmail offers an API specifically designed for rapid notifications.
HTTP polling
Most web servers can handle being pinged once per second without any issues. However, if a server struggles with this frequency, it may indicate security vulnerabilities such as susceptibility to Denial of Service attacks.
Google's robust infrastructure can manage frequent requests, but keep in mind they may enforce rate limits on their Gmail API. Be sure to review their documentation to understand their restrictions.
While traditional HTTP isn't optimized for constant polling, you can still make numerous requests provided the data payload is small and processing demands are minimal. Bandwidth consumption may be a concern for users charged by usage time or data volume.
Consider the necessity of checking emails every second versus less frequent intervals. Adjusting the refresh rate based on activity levels can help conserve resources and optimize user experience.