开发者

How do you determine an acceptable response time for App Engine DB requests?

According to this discussion of Google App Engine on Hacker News,

A DB (read) request takes over 100ms on the datastore. That's insane and unusable for about 90% of applications.

How do you determine what is an acceptable response time for a DB read request?

I have been using App Engine without noticing any issues with DB responsiveness. But, on the other hand, I'm not sure I would even know what to loo开发者_Go百科k for in that regard :)


You can measure precisely how much each RPC call (datastore or otherwise) is taking, thanks to Guido van Rossum's AppStats relatively-new component (it's part of the standard SDK since 1.3.1). See here for more. 100 milliseconds is fine for most well-designed apps -- if you need to make two or three queries to serve a page, you can still serve in less than half a seconds even if there's lots of processing and rendering involved... not too shabby. Plus, you can use memcache to reduce many of those latencies, etc.


The poster is wrong. Datastore get operations are much faster - about 15-20ms each, currently. Datastore query operations can be slower, because they're much more involved and return more data, but they still complete in anywhere from 30-100ms for a typical query. Other posters have amply addressed whether that's "acceptable" or not.


What do you mean by acceptable? What kind of application are you writing? Acceptable means different things for different domains/applications/people. First, you should decide how quickly you want your app to respond to a request. Let's pick 1 second, just for argument's sake. Now, how many DB requests do you need to make to fulfill that request? Let's say 5. Let's also say that we also have 400ms worth of other processing to do. OK, so that's 5 reads times 100ms each, plus 400ms of other stuff. 900ms total, which is less than our goal of 1 second. Perfect! 100ms is an acceptable read rate. In fact, 120ms would still be acceptable, just barely.

Now, let's generalize:

numberOfReads * readTime + otherStuffTime = TotalTime

Fill in your numbers, and you can see what is an acceptable time for your particular situation.


If you haven't noticed any issues then it is by definition an acceptable response time. The only question is how long your users are happy to wait.


An "an acceptable response time for a DB read request" depends entirely on your application and your users.

If the net result is that your site runs fast enough to satisfy you and your users then the slow response time of the services provided by Google in their AppEngine are acceptable.

Now, looking deeper at this particular issue, it sounds like we are talking about GET's. Here are the figures for GET latency and it looks to me that the average latency is closer to 50ms then 100. I'm not saying that is good, but I don't think it is accurate to say 100ms.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜