Thursday, August 24, 2006

Amazon EC2

Amazon EC2 เป็นบริการใหม่ของ Amazon
ทำให้เราสามารถ สร้าง Amazon Machine Image (AMI) ที่ต้องการ
(จริงๆแล้ว มันก็คือ disk image ที่เอาไปใช้ run virtual machine)
นำไป deploy บน Amazon EC2
จากนั้นก็สามารถ start instance ตามจำนวนที่ต้องการได้

ลองดูตัวอย่างสถานะการณ์การใช้งาน
Mary wishes to deploy her public, fault tolerant, three tier web service in Amazon EC2. Her grand plan is to have her web tier start off executing in seven instances of ami-fba54092, her application tier executing in twenty instances of ami-e3a5408a, and her multi-master database in two instances of ami-f1a54098.


ค่าบริการคิดตามที่ใช้จริง
processing - $0.10 per instance-hour
data transfer (internet traffic) - $0.20 per GB
Storage - $0.15 per GB
(storage ใช้บริการจาก Amazon S3)

วิธีที่สร้าง AMI (Amazon Machine Image) ก็คล้ายๆกับที่เรา add guest-os ให้กับ xen
โดยต้องทำในเครื่องเราให้เรียบร้อยก่อน
จากนั้นจึง upload ขึ้นไป

ดูจากวิธีการสร้าง image แล้ว
ตัว infrastructure ของ EC คงใช้ fedora กับ xen

ข้อจำกัดอีกอย่างก็คือ
ตัว server ต้องใช้ dynamic IP เท่านั้น

ข้อดีที่เห็นชัดๆ ก็คือ เราสามารถเพิ่ม instance ได้ตามต้องการ
ทำให้การตอบสนองต่อพวก spike load ทำได้โดยง่าย

อย่างนี้ A-NET, O-NET ก็น่าไปใช้บริการนะ
เพราะปีหนึ่งมีประกาศผลแค่ไม่กี่ครั้ง แต่ต้องลงทุน server ไปกับ spike load

Related link from Roti

No comments: