Thread: Forum Issues?
View Single Post
Lt. Commander
Join Date: Dec 2007
Posts: 120
# 4
01-28-2010, 06:02 PM
Originally Posted by coderanger
Most of these issues are caused by the fact that we have multiple web servers behind a load balancer. They can be a few seconds out of sync at any given time. Specifically the post order issues are usually because one server has its clock a few seconds off compared to another. Just another day on the intertubes ;-)
I've taken a look at a couple of the examples of this happening, and the underlying records are obviously being stored with an identity key, so even though the timestamps may not order correctly, you could always order by this post id and it should work properly. I've had similar situations with high concurrency in a database where it was possible for two or more records to get created at the same exact time down to the millisecond. We absolutely had to know which record was created first, and since we were using identities as primary keys, we could just order by the id field and it was more reliable than using the date we were storing.

I'm not sure of all of the internals of this forum software, but it would seem silly for the web server to determine the date of the post record anyways, rather than the database, but using that post id as the ordering column should solve the issue.