TTL usage

I'm using Cassandra to store piece of information that have a natural expiration date and time. When inserting them, I calculate the TTL based on the expiration date. This should mean that when the data expires it should automatically be removed from Cassandra (given resources are available and all).

If this column-with-TTL is sync with another Cassandra node, possibly in another timezone, will the actual time on which the TTL should delete the column change or not?

For example, suppose I put in a column in Cassandra at 00:00 in the GMT timezone with an expire time of 25 hours. This means it will be deleted the next day at 01:00. This column is synced to a server in Germany (GMT+1). Will that copy of the column also expire at 01:00 GMT, or 02:00 local time?

When an expiring column is inserted into Cassandra, the coordinator node actually transforms the TTL value provided into a timestamp based on that node's local clock (current time + TTL). The column is expired once the local clock on the queried node rolls past this expiration time.

It's important (and a best practice) for the system clocks on all of your nodes (including the app tier) to be on UTC/GMT and regularly synchronized using NTP to avoid any issues like this.

Aside from the system clocks requirement (which kinda make the problem go away), the answer is not definitive to me; the calculated expire time, does it contain a timezone?

So in my example, given that I insert a column on 2012-02-21T00:00:00+00:00 with a TTL of 25 hours, the expire time becomes 2012-02-22T01:00:00+00:00, or 2012-02-22 01:00 zulu.

When synced with a node in GMT+1, where we will assume that the system clock also is on GTM+1, if the expire time holds the timezone, it can easily be converted to the system clock, so on this server the expire time is 2012-02-22 02:00 zulu. Does Cassandra work like this? Or is having the system clock of all nodes at GMT a must?

Timezones should not matter to cassandra, provided you have them configured correctly. What is important is that the system clocks on the nodes are synchronized using NTP.

Cassandra will use unix timestamps (http://en.wikipedia.org/wiki/Unix_time) for calculating the ttl expiration. Unix timestamps are timezone agnostic. You can see what I mean pretty easily using the date command in a unix environment: