Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Network Engineer practice bank has an additional 2,437 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You are configuring a Google Cloud Armor security policy for a multi-tenant HTTPS application behind a global external Application Load Balancer. Clients send a session_id cookie and a custom X-Tenant-ID HTTP header over tenant-specific hostnames.
Your rate limiting rule must meet these requirements:
X-Tenant-ID header, and session_id cookie.429 Too Many Requests without imposing a ban period.Which Cloud Armor rule configuration should you apply?
--action=throttle, --rate-limit-threshold-count=500, --rate-limit-threshold-interval-sec=120, --conform-action=allow, --exceed-action=deny-429, and --enforce-on-key-configs="SNI,HTTP-HEADER=X-Tenant-ID,HTTP-COOKIE=session_id".Google Cloud Armor throttle rate limiting controls the maximum rate of requests forwarded to backend services by allowing conforming traffic (conform-action=allow) and applying an exceed-action only to requests above the configured threshold. Using --enforce-on-key-configs lets you combine up to three distinct request attributes into a composite tracking key.
--enforce-on-key-configs="SNI,HTTP-HEADER=X-Tenant-ID,HTTP-COOKIE=session_id" aggregates counts per unique combination of TLS SNI hostname, X-Tenant-ID header value, and session_id cookie value, staying within the three-key limit.--rate-limit-threshold-count=500 and --rate-limit-threshold-interval-sec=120 set the limit to 500 requests over a valid 120-second evaluation window.--action=throttle with --conform-action=allow and --exceed-action=deny-429 permits conforming traffic and rejects only excess requests with 429 Too Many Requests, without imposing a full ban period.throttle rule to rate-based-ban in place without deleting and recreating the rule.interval_sec values: Valid evaluation windows are 10, 30, 60, 120, 180, 240, 300, 600, 900, 1200, 1800, 2700, or 3600 seconds.deny status codes: exceed-action supports deny-403, deny-404, deny-429, and deny-502, as well as redirect (google-recaptcha or external-302).throttle supports rate_limit_threshold_count values from 1 up to 1,000,000.Compared to rate-based-ban, throttle preserves service availability during traffic spikes by shedding only excess load, uses the recommended 429 status code, and retains full flexibility to convert to rate-based-ban later via a rule update.
--action=throttle, --rate-limit-threshold-count=500, --rate-limit-threshold-interval-sec=120, --conform-action=allow, --exceed-action=deny-429, and --enforce-on-key-configs="IP,SNI,HTTP-HEADER=X-Tenant-ID,HTTP-COOKIE=session_id".Google Cloud Armor multi-key rate limiting allows administrators to combine multiple client attributes into a single composite enforcement key using the --enforce-on-key-configs parameter. Requests are counted and evaluated independently for each unique tuple of the specified key values.
IP, SNI, HTTP-HEADER, and HTTP-COOKIE) violates the configuration limit and causes the rule creation command to fail.IP also introduces client IP tracking that was not requested and can cause unintended rate-limit fragmentation when legitimate users traverse dynamic carrier-grade NAT pools.--enforce-on-key-configs.HTTP-HEADER or HTTP-COOKIE keys within that three-key budget, but only one of any other key type (such as IP, XFF-IP, SNI, HTTP-PATH, or REGION-CODE).SNI key values are each truncated to their first 128 bytes.ALL.This configuration would be valid if IP were removed so that at most three keys remained, or if one of the other keys were replaced by IP in a scenario where per-IP differentiation was explicitly required.
When clients sit behind shared corporate NAT gateways, omitting IP and keying on application-layer and TLS-layer identifiers like SNI, HTTP-HEADER, and HTTP-COOKIE provides granular isolation without penalizing unrelated users.
--action=rate-based-ban, --rate-limit-threshold-count=500, --rate-limit-threshold-interval-sec=120, --ban-duration-sec=60, --conform-action=allow, --exceed-action=deny-429, and --enforce-on-key-configs="SNI,HTTP-HEADER=X-Tenant-ID,HTTP-COOKIE=session_id".A Cloud Armor rate-based-ban rule enforces a per-key request threshold and temporarily blocks all subsequent requests matching that key once the threshold is exceeded, serving the configured exceed_action for the remainder of the evaluation window plus an additional ban_duration_sec penalty period.
--ban-duration-sec=60), rather than only dropping excess traffic.rate-based-ban cannot later be updated to throttle—it would have to be deleted and recreated.ban_duration_sec values: Ban durations can be set to 60, 120, 180, 240, 300, 600, 900, 1200, 1800, 2700, or 3600 seconds.rate-based-ban supports a maximum rate_limit_threshold_count of 10,000 requests, whereas throttle supports up to 1,000,000 requests.ban_threshold_count: You can add a secondary, higher ban_threshold_count over ban_threshold_interval_sec to throttle occasional spikes while banning only persistent abusers.throttle to rate-based-ban, but never downgrade rate-based-ban to throttle.This configuration would be optimal if you wanted to completely block abusive clients for at least 60 seconds beyond the evaluation window once they exceed 500 requests, without any requirement to switch back to pure throttling later.
--action=throttle, --rate-limit-threshold-count=500, --rate-limit-threshold-interval-sec=120, --conform-action=allow, --exceed-action=deny-429, --enforce-on-key=SNI, --enforce-on-key=HTTP-HEADER, --enforce-on-key-name=X-Tenant-ID, --enforce-on-key=HTTP-COOKIE, and --enforce-on-key-name=session_id.In the gcloud compute security-policies rules create command, --enforce-on-key and --enforce-on-key-name are designed for configuring a single rate limiting key (such as a single IP, SNI, HTTP-HEADER, or HTTP-COOKIE with its corresponding header or cookie name).
--enforce-on-key and --enforce-on-key-name to combine multiple keys in a single Cloud Armor rule. When using multiple enforcement keys, Cloud Armor requires the --enforce-on-key-configs flag, which explicitly pairs each key type with its name using a comma-separated KEY=NAME list.--enforce-on-key-name accepts only a single string value, repeating --enforce-on-key and --enforce-on-key-name cannot bind X-Tenant-ID specifically to HTTP-HEADER and session_id specifically to HTTP-COOKIE.--enforce-on-key-configs replaces both --enforce-on-key and --enforce-on-key-name for multi-key rules.SNI, IP, XFF-IP, HTTP-PATH, REGION-CODE, TLS-JA4-FINGERPRINT, and ALL—are listed by key type alone inside --enforce-on-key-configs.HTTP-HEADER and HTTP-COOKIE) must use the KEY=NAME format inside --enforce-on-key-configs.The --enforce-on-key and --enforce-on-key-name flags would work if you only needed to enforce rate limiting on a single key, such as --enforce-on-key=HTTP-HEADER --enforce-on-key-name=X-Tenant-ID alone.
Even when configuring a single key, --enforce-on-key-configs is supported and provides a consistent syntax across both single-key and multi-key Cloud Armor rate limiting policies.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated