CEL  |  Common Expression Language

submited by
Style Pass
2024-05-10 21:00:07

Common Expression Language (CEL) is an expression language that’s fast, portable, and safe to execute in performance-critical applications. CEL is designed to be embedded in an application, with application-specific extensions, and is ideal for extending declarative configurations that your applications might already use.

Use CEL for things like list filters for API calls, validation constraints on protocol buffers, and authorization rules for API requests.

CEL is ideal for performance-critical applications because it was designed to evaluate safely and quickly (nanoseconds to microseconds) with predictible costs. CEL expressions are especially useful for predicate logic and simple data transformations.

CEL is used most efficiently in applications where expressions are evaluated frequently, but modified infrequently. For example, evaluating an HTTP request against a security policy is an excellent use case for CEL. A CEL security policy expression would have a one-time configuration cost for validating the expression and then be evaluated very frequently at a negligible cost.

Leave a Comment