I have been working recently with Matt Yonkovit to get Waffle Grid cloud enabled with Amazon Web Services (AWS) .
An initial version of Waffle Grid Cream – Version 0.5 release is now available.
We have elected to create one AMI for now, that is ready to be configured as either a MySQL Server, a memcached server, or as in the following example both. For this first version, we have also not configured MySQL or memcache, but rather provide a virgin Waffle Grid ready server for developers to experiment and benchmark with.
Future releases will include custom AMI’s and the automated ability to register new memcached servers with the Waffle Grid enabled MySQL server.
Instance Creation
We assume you have created an EC2 account and are using one of the many tools available to launch images.
The AMI you want to launch is ami-0575936c. This is an Ubunut Intrepid 8.10 32bit small instance, and includes MySQL 5.4.0 beta and Memcache 1.4.0 RC1.
Configuration
$ ssh -i [key] ubuntu@ec2-[hostname] $ ps -ef | grep -e "mysql" - "memcached" $ memcached -m 1024 -p 11211 -u nobody -l 127.0.0.1 -d $ memstat -s localhost $ sudo /etc/init.d/mysql start
Verification
$ mysql -uroot -e "SELECT VERSION" $ mysql -uroot -e "SHOW ENGINE INNODB STATUSG"
The Innodb Status shows a new section.
--------- MEMCACHED --------- Memcached puts 0 Memcached hits 0 Memcached misses 0 Memcached Prefix: 3576
Testing
$ mysql -uroot -e "SELECT COUNT(*) FROM sakila.actor" $ mysql -uroot -e "SHOW ENGINE INNODB STATUSG" $ memcached -s localhost
Verification will show the change of information in the INNODB STATUS output.
--------- MEMCACHED --------- Memcached puts 4 Memcached hits 0 Memcached misses 4 Memcached Prefix: 3576 Memcached Miss Total Lat 103 (us) Memcached Miss Recent Lat 103 (us) Memcached Set Total Lat 760 (us) Memcached Set Recent Lat 760 (us)
You can also confirm stats in memcached.
$memstat -s localhost Listing 1 Server Server: localhost (11211) pid: 3453 uptime: 575 time: 1245013741 version: 1.4.0-rc1 pointer_size: 32 rusage_user: 0.0 rusage_system: 0.0 curr_items: 5 total_items: 5 bytes: 82265 curr_connections: 6 total_connections: 9 connection_structures: 7 cmd_get: 4 cmd_set: 5 get_hits: 0 get_misses: 4 evictions: 0 bytes_read: 82265 bytes_written: 82265 limit_maxbytes: 1073741824 threads: 5