2010年4月29日星期四
關於在亞馬遜雲計算上搭建網站的可行性分析
後來開始關注云計算,結果發現國內根本沒有成功可用的 商業雲計算平台。只好向外看了。感謝鮮橙加冰對我說亞馬遜的雲計算不錯,於是就抽了個 時間來看。首先關注的當然是費用問題:
亞馬遜的雲計算服務分部在美國東部、西部和歐洲的愛爾 蘭三個地方,從國內訪問的角度考慮,美國西部的地理位置比較有利
註冊之前,在AWS的EC2報價上,一個small實 例的價格是每小時$0.095,這樣計算的話,每天24小時,每年365天算,是$832.2,按照6.7的匯率算(Sorry我真不知道現在的匯率,也懶得查了……),折合人民幣是 ¥5575.74。再加上全年的IP,存儲(都是小錢)的成本,小 7000塊錢的成本,整個站就額可可以跑一年哦!這樣的價格,我認為還是很有吸引力的。我們可以羅列一下好處:
1.國內一台普通的VPS也要5000塊左右吧。 EC2一個small實例的配置是1EPU(1個 ECU差不多相當於1個1.0GHz 2007 Xeon處理器)+1.7G內存的。這樣的配置,5000塊的VPS可就下不來了吧……
2.雲計算的機器基本上不會存在一些物理上的問題,電 力,網絡,硬盤損壞,等問題。
3.在天朝做網站會擔驚受怕,弄不好就會被拔網線,或 者是機房停業整頓的時候受牽連。 EC2就不會了,就算不幸IP被封,釋放IP,重新獲 取一個,重新解析,兩個小時以後又是一個好站~~(我可沒有引導大家做壞事的意思,請大家做站慎重! )
4.如果和國內的虛擬機價格比較的話,是高了點,但是 虛擬機可沒有固定的內存,CPU給你哦,更沒有可愛的ssh權限呢!
臨時想了一下就這麼多,當然,你得有一張VISA的支 付卡,可以在線支付的哦~~
回頭我再寫關於註冊等方面的步驟給大家共享吧!
PS:最近家裡用的是公用網絡,慢的要死,與昨晚決定 自己安裝ADSL,所以下篇文章的更新可能稍微需要一些時間。 (2010-04-16)
Announcing the Asia Pacific (Singapore) Region
Dear AWS Customer,
We are excited to announce the immediate availability of our first Asia Pacific Region in Singapore.
Starting today, Asia Pacific-based businesses and global businesses with customers based in Asia Pacific can run their applications and workloads in AWS's Singapore Region to reduce latency to end-users in Asia and to avoid the undifferentiated heavy lifting associated with maintaining and operating their own infrastructure. Our new Singapore Region launches with multiple availability zones and currently supports Amazon Elastic Compute Cloud (Amazon EC2), Amazon Simple Storage Service (Amazon S3), Amazon SimpleDB, Amazon Relational Database Service (Amazon RDS), Amazon Simple Queue Service (Amazon SQS), Amazon Simple Notification Service (Amazon SNS), Amazon CloudWatch, and Amazon CloudFront. Singapore Region pricing is available on the detail page of each service, at aws.amazon.com/products.
We continue to expand our datacenter presence globally, based in large part on customer input, so please keep that feedback coming. In the meantime, we encourage you to take advantage of our newly announced AWS Singapore Region!
Sincerely,
The Amazon Web Services Team
We hope you enjoyed receiving this message. If you wish to remove yourself from receiving future product announcements and the monthly AWS Newsletter, please update your communication preferences.
Amazon Web Services LLC is a subsidiary of Amazon.com, Inc. Amazon.com is a registered trademark of Amazon.com, Inc. This message produced and distributed by Amazon Web Services, LLC, 1200 12th Ave South, Seattle, WA 98144.
Amazon EC2 開始在亞洲提供服務了
好消息, EC2現在已經提 供Asia Region了! 之前EC2有提供的3個regions, 不是在美國就是在歐洲. 如果你的網站是要給美國或歐洲的使用者的話就沒問題, 可是如果目標客戶是在亞洲的話, 連到美國的速率和latency就會比較差. 之前AWS提供的CloudFront 有解決一部份的問題, 因為CloudFront有提供香港, 東京, 和新加坡的Edge Locations.(我之前試, 台灣是去香港下載) 不過CloudFront在AWS還算是非常新的服務, 所以功能還算陽春. 能夠服務的只有放在S3上的靜態檔案, 在設定上也沒有彈性, CloudFront是完全看S3上面該Object的metadata, 所以如果要改很多objects的cache 時間, 還得一個一個改才行.
如果你的靜態檔案已經放在CloudFront上的話, 那麼現在你也可以把你的Web servers, Application servers放到離使用者更近的地方了. 有多近? AWS是說在Asia-Pacific的Singapore啦! 好咩, 看一下是不是真的:
$ ec2-describe-regions
REGION eu-west-1 ec2.eu-west-1.amazonaws.com
REGION us-east-1 ec2.us-east-1.amazonaws.com
REGION us-west-1 ec2.us-west-1.amazonaws.com
REGION ap-southeast-1 ec2.ap-southeast-1.amazonaws.com
真的多了一個region耶! 厚… 不過名字怎麼那麼長, 我就最怕長的名字咩. 看看有幾個availability zones:
$ ec2-describe-availability-zones --region ap-southeast-1
AVAILABILITYZONE ap-southeast-1a available ap-southeast-1
AVAILABILITYZONE ap-southeast-1b available ap-southeast-1
目前我還沒開instances來試試網路, 要試的話有好多工作要做啊! 還得先做AMI. 如果你準備在台灣開網站的話, Amazon EC2現在是個好選擇咩!