title: Google App Engine and data replication with multiple instances
body: <p>I'm using the Google App Engine as the backend for an iOS game that was just released.  </p>
  
  <p>Through that act of playing the game, players create levels and then those are shared with their friends and the world at large. GAE is used to store and retrieve those levels. GAE also Manages player's high scores since they are more complex than Game Center can handle.</p>
  
  <p>As a whole, GAE works great. I like how GAE spins up new instances as they are needed without me having to constantly monitor load.  For this game, GAE is running around 10 instance and serving around 8 queries a second.</p>
  
  <p>But there is a small problem.</p>
  
  <p>I've noticed that sometimes players will get on the high score table twice.  This should not be possible since I remove any old scores before putting up the new scores (this is done in one query to GAE).</p>
  
  <p>After some testing and poking around, it seems that what is happening is that a player will get a high score and instance 1 handles the removing of the old score and the adding of the new one.  The player then gets a new high score, but this time instance 4 is the one that handles the request and it doesn't know about the other score yet.</p>
  
  <p>At their fastest, it might take a player 10 seconds to get a new high score.  It was my understanding that the replication of data only took 2 or 3 seconds.</p>
  
  <p>I never saw this problem during testing because load rarely caused 2 instances to be started.</p>
  
  <p>Does this seem like a plausible explanation for what is happening and how data is stored for each instance?</p>
  
  <p>Is there a way to guarantee that data added, deleted or altered in one instance will be available in another?  High scores are not "mission critical", so I'm not too worried about it, but I would like to use GAE for some more complex situations where it is very important that data is consistent.</p>
  
  <p>Is that possible with GAE, or should I be looking at other solutions?</p>