2009-07-16 8 views
6

Google AppEngine/JavaでJRuby on Railsアプリケーションをホスティングする予定です。私はどのようにこのへ上へa great blog post by Ola Biniを見つけましたが、要約すると、彼は言う:on RailsのGoogle AppEngine:「ランタイムスタートアップ」の発生頻度

全体的に、JRubyのは いくつかの小さな詳細を除き、App Engineの上だけでなく、非常 動作します。主要なもの はスタートアップコストとテストです。 が発生すると、実際には事前に GAE/Jを取得することはできません。代わりに あなたは最初のリリースをさせる必要があります ヒットこれを取る。さあ、GAE/Jは バイトコードと の事前確認を行いますので、起動はもう少し重くなります 他のJDKよりも。 1つのランタイムは起動時までに壁面に約12秒の時間がかかります。 最初のヒットには時間がかかります。

私はこれについて十分に理解していません。実行時にどのような状況で起動する必要がありますか?通常の20秒遅れが問題になりそうです。

答えて

7

App Engineは、現在実行中のインスタンスをデマンドするときにいつでも新しいランタイムを開始します。その後、需要が低い場合にはインスタンスをシャットダウンします。結局のところ、これは、アプリケーションが一定の時間使用されない場合、インスタンスのすべてがシャットダウンされる可能性があることを意味します。次に、ユーザーが次にアプリケーションにアクセスしようとすると、新しいインスタンスを開始する必要があります。または、一部の人が呼び出すように「スピンアップ」する必要があります。

 

7:40pm] nwinter: Is it possible to get a rough estimate of how long an app 
instance will stick around once spawned? 
[7:40pm] marzia_google: @nwinter, not really 
[7:40pm] marzia_google: there are no garuntees 
[7:41pm] nwinter: No average time or anything? 
[7:42pm] marzia_google: @nwinter i'm not sure an average time would be 
meaningful, even if i knew off hand what it was (i don't) 
[7:42pm] marzia_google: since it really can be quite variable 
[7:42pm] Kardax: Re instance lifetime: So an app instance could last a few 
seconds or a few hours? Just curious 
[7:43pm] dan_google: nwinter: Apps are evicted by least-recently-used on an 
app server. As someone noted recently (forums or chat I forget), low 
traffic could mean lots of "restarts", but so could spikes in traffic which 
may start new instances on multiple app servers. 
[7:43pm] nwinter: @dan_google: good to know! 
[7:43pm] dan_google: Kardax: Yes, depending on the weather. By which I 
mean, request patterns, other apps on each app server, and so forth. Not 
really predictable. 

これは、App Engineのチームとのチャットのトランスクリプトです:

3月の時点では、App Engineのチームは、インスタンスが起動したままになりますどのくらい上の任意の公式の見積もりを与えないだろう。私は、「そういうわけでログインしています」のように、トランスクリプト内の関連性のない行を削除しました。完全な転写物を見つけることができます here

+0

ありがとう、ずっと今よりはっきりしています。 –

関連する問題