Security and compliance

Cast AI takes data processing and storage seriously, storing only the minimum data required to provide the service. Your data and cached query responses never leave your infrastructure; only anonymized query metadata reaches the Cast AI control plane.

Where data lives

  • Cached query responses stay in memory inside the Proxy, a self-hosted component in your Kubernetes cluster or on Amazon ECS that is subject to the security and access policies of your own infrastructure. TTL values are automatically set per query; see Auto vs. Manual mode and override rules for how TTLs are managed.
  • The Cast AI control plane receives only anonymized metadata about query patterns, which powers the console's analytics and recommendations. Cast AI does not access the actual data within your databases.
  • No write access: the read-only, scoped credentials created by the connect script (an IAM role for AWS, a service account for Google Cloud) do not allow Cast AI to modify your database configuration. Access requirements and permissions lists exactly what the script creates.

SQL anonymization

Query SQL is processed in real time inside your infrastructure and anonymized at ingestion; the Performance Advisor works from these anonymized templates. All literal and parameter values, including those in prepared statements, are hashed, so no personally identifiable information is stored. Database names, table names, column names, and SQL keywords are not anonymized, because they are needed to analyze query structure and target recommendations.

For example, SELECT * FROM employees WHERE emp_no = 1001 is stored as SELECT * FROM employees WHERE emp_no = [?], where [?] replaces the hashed value. A query with no parameters, such as SELECT AVG(salary) FROM salaries, is stored unchanged.

Retention

  • Anonymized query SQL is retained for 14 days.
  • Aggregated metrics used for longer-term views are retained for 90 days.
  • After these periods, the data is automatically deleted.

Related resources


Did this page help you?