Cassandra has added guardrails feature some time ago, bust none of the guardrails have any default value set in the configuration file (see cassandra.yaml). I generally wonder how can a db admin know what value to set for a specific guardrail, and I'm mainly interested in the values for fields_per_udt_warn_threshold and fields_per_udt_fail_threshold. Is there maybe any document with suggested values, are there actually any data that'd support choosing one value over the other? Or should we rather set these basing on a gut feeling/experience, and guardrails lack defaults, because they're very case-specific?

I'm also afraid that if guardrails are disabled by default, no user/db admin will want to set them, not even mentioning a possibility of people being generally unaware of these options (there're so many in the config file already...). Even more so, if you imagine guardrails of only the warn level/soft limits breaking stuff in the long run, e.g. via clogging logs.

1 Answer 1


You are correct that there is no default value set for the user-defined type (UDT) guardrails other than being disabled.

For a bit of background, the Guardrails framework released in Cassandra 4.1. For the most part, this release is the first phase which lays the foundation on which others can build on top of so the specifics of each guardrail wasn't the focus. Those will come as the guardrails mature and we as a community are able to gather intelligence from the field.

Having said that, our opinion is that there should be a maximum of 30 fields and ideally have a maximum size of roughly 64KB for optimal performance. This obviously means that the warning threshold should be lower, say, 20 or 25. Of course, your miles may vary.

As always, our general recommendation is limit the number of UDT fields to a small number. Where possible, you should avoid using UDTs when designing your data model particularly when the data can be mapped to native CQL columns. Cheers!

  • Thank you so much for this answer, it explains a lot! Apr 7, 2023 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.