The Modes of Operation
Google Safe Browsing V5 allows clients to choose from three modes of operation, allowing users to pick the best suited mode for their use case. This page contains a high-level overview of each mode along with their trade offs.
Each of the modes of operation can be performed with urls.search or hashes.search. See the Overview to determine which method is appropriate for you. The detailed pages of the modes of operation will assume usage of the hashes.search.
Real-Time Mode
This mode offers the highest performance by using a local database of both likely-safe sites (the Global Cache) and known threats to complete checks locally and greatly reduce network calls.
Advantages
- High Security: Provides near-real-time protection against new threats when performing live checks.
- High Performance: URLs are checked locally against the Global Cache or threat lists, avoiding unnecessary network calls.
Drawbacks
- Complexity: Requires the client to manage and synchronize a local database with the contents of the Global Cache and threat lists of interest.
Local List Mode
This mode requires the client to maintain a local database of known threats. A URL is checked against this local list, and a request is only sent to the server to verify a potential match.
Advantages
- High Performance: URLs are checked locally against the threat lists, avoiding unnecessary network calls.
Drawbacks
- Missed protection: Protection is only as current as the last update to the local list, which can leave a window of vulnerability to new threats.
- Complexity: Requires the client to manage and synchronize a local database with the contents of threat lists of interest.
No-Storage Real-Time Mode
This mode is for clients that cannot or do not want to maintain a local database. Every URL check is sent directly to the Safe Browsing service, providing real-time results without requiring local storage.
Advantages
- High Security: Provides near-real-time protection against new threats when performing live checks.
- Simple Implementation: Avoids the complexity of managing a local database.
Drawbacks
- Lower Performance: Every URL check requires a network request, which inheriently has higher latency than a local check.
- Higher Network Usage: Generates more network traffic than other modes.
- Higher Quota Usage: Each check eats into the allocated quota for the client project.