Patent attributes
Transaction processing for a database distributed across availability zones is disclosed, including: determining that a transaction comprising a set of one or more statements is to be executed on a plurality of database servers across at least two availability zones, wherein each availability zone is associated with a respective hybrid logical clock (HLC)-based centralized time service; causing the set of one or more statements to execute on the plurality of database servers across the at least two availability zones; obtaining a plurality of HLC-based prepare timestamps from the plurality of database servers across the at least two availability zones; selecting a maximum HLC-based prepare timestamp to use as a commit timestamp associated with the transaction; and determining whether to return a commit result corresponding to the transaction after a time delay that is determined based at least in part on a predetermined time skew.