# Database hosting ala S3 (was Re: \[Rails-deploy\] Re: Review o

**URL:** <https://www.ruby-forum.com/t/database-hosting-ala-s3-was-re-rails-deploy-re-review-o/85009>\
**Category:** Deployment\
**Created:** [February 9, 2007, 7:05am UTC](https://www.ruby-forum.com/t/database-hosting-ala-s3-was-re-rails-deploy-re-review-o/85009 "2007-02-09T07:05:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hendy\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b4bc9f/32.png) [@Hendy\_I](https://www.ruby-forum.com/u/Hendy_I)\
**Post date:** [February 9, 2007, 7:05am UTC](https://www.ruby-forum.com/t/database-hosting-ala-s3-was-re-rails-deploy-re-review-o/85009/1 "2007-02-09T07:05:56Z")

</div>

Hi Robby,

> Exactly. Rails hosting shouldn’t fall into the same cheap php hosting  
> environment. Tons of storage isn’t going to solve your Rails deployment  
> problems. If you need more disk space, we can always customize a  
> package… but actually recommend that you find yourself a cheap host  
> (amazon s3 for example) for tons of disk space. If you need it for your  
> database… you shouldn’t be looking at shared hosting anyways.

Yup I agree!

Although I myself is one person that values space/bandwidth for $$  
quite a lot as my DB is almost cramped up with just 2 GB and have 20  
GB/month traffic… I always think that #1 on the list is customer  
support. People would pay a lot for that. There’s no such thing that  
compares to the satisfaction of having a problem, then a simple phone  
call/IM chat/whatever and the people on the other end quickly solves  
the problem and within assistance always, focused on our problem at  
hand. But e-mail support that takes \> 48 hours to reply? These guys  
need to get a better job. (and maybe you’ve ever had “We’ve forwarded  
your inquiry to our tech support department, please wai…”)

> I haven’t used the other services, but I know that we have many  
> customers that have. Almost all of our employees are developing Rails  
> applications on a daily basis… so we think like developers. Most of  
> our customers… are developers. They want more control over their  
> deployment solution, so we give it to them… because it’s what we want.  
> as well. 😉

Thank you, I’ve edited my list to include a bit details about your  
service. I’m not that good writer though… ☹

> We’re also huge PostgreSQL fans (I’ve been working with PostgreSQL for  
> several years before Rails was even around…) and we let you run your  
> own private instance of it. I don’t think most of the other rails  
> environments give you that flexibility (currently).

That gives me a wondering… is there something like Amazon S3 for  
DBMS? I know some of people have been talking about this possibility.

In my mind, maybe it’s like:

- managed database (of course). PostgreSQL & MySQL are musts I guess.
- easily clone database, either for development, staging, test.  
whatever.
- track database update changes. easily regenerate a schema of any  
version of DB in the past.
- daily/hourly/whatever backups.
- easily cluster databases.
- easily set up master-slave replication.
- scale the database, maybe automatically, when the need arrives. so  
developers can focus on their app, not pulling their hair out when  
they’ve got tons of DB requests per second and they’re not sure how to  
best setup Slony-I.
- automated consistency tests. (test-driven database design?) 😉

–  
Hendy I.  
Web: [http://hendy.gauldong.net](http://hendy.gauldong.net)  
Mobile: +62 856 24889899  
Yahoo Messenger: ceefour666  
LinkedIn: [http://www.linkedin.com/in/ceefour](http://www.linkedin.com/in/ceefour)

---

<div class="post-metadata">

**Author:** ![Hendy\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b4bc9f/32.png) [@Hendy\_I](https://www.ruby-forum.com/u/Hendy_I)\
**Post date:** [February 9, 2007, 7:12am UTC](https://www.ruby-forum.com/t/database-hosting-ala-s3-was-re-rails-deploy-re-review-o/85009/2 "2007-02-09T07:12:57Z")

</div>

On 2/9/07, Hendy I. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> That gives me a wondering… is there something like Amazon S3 for  
> DBMS? I know some of people have been talking about this possibility.

I guess the issue with a service like that is latency. If you have  
your database on a different network to your application you’ll  
probably notice a considerable slow-down, especially if you do lots of  
queries.

But then, benchmarks speak much louder than words and my “hunch” might  
be wrong. It’d also depend on your application, what caching you have  
in place etc. etc.

If a web-host provided a service like you described so that you could  
have that on the same network as your application you’d be cooking.

- Ben

---

<div class="post-metadata">

**Author:** ![Hendy\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b4bc9f/32.png) [@Hendy\_I](https://www.ruby-forum.com/u/Hendy_I)\
**Post date:** [February 9, 2007, 7:51am UTC](https://www.ruby-forum.com/t/database-hosting-ala-s3-was-re-rails-deploy-re-review-o/85009/3 "2007-02-09T07:51:00Z")

</div>

Amazon Simple Table Service.

---

<div class="post-metadata">

**Author:** ![Hendy\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b4bc9f/32.png) [@Hendy\_I](https://www.ruby-forum.com/u/Hendy_I)\
**Post date:** [February 19, 2007, 4:12am UTC](https://www.ruby-forum.com/t/database-hosting-ala-s3-was-re-rails-deploy-re-review-o/85009/4 "2007-02-19T04:12:42Z")

</div>

I’m not sure it’d be responsive enough to use as a database store but  
it’s definitely well-suited for database backups and such. I’ve been  
watching the development of a couple S3-related OS X tools like S3  
Backup ( [http://s3bk.com/](http://s3bk.com/) ) and S3 Browser (  
[http://people.no-distance.net/ol/software/s3/](http://people.no-distance.net/ol/software/s3/)  
) for signs of what you’re talking about. I know that the S3 Backup  
guys are looking at the possibility of using S3 in a similar fashion  
as U3 ( [http://www.u3.com/](http://www.u3.com/) ) – storing applications on S3 and running  
them from there. I just don’t think it’ll be fast enough for that  
sort of thing but it would certainly be cool.

An automated tool for database backups would rock. I’m sure something  
like this is on the horizon – it’s too cool not to be.

---

<div class="post-metadata">

**Author:** ![Hendy\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b4bc9f/32.png) [@Hendy\_I](https://www.ruby-forum.com/u/Hendy_I)\
**Post date:** [February 19, 2007, 4:25pm UTC](https://www.ruby-forum.com/t/database-hosting-ala-s3-was-re-rails-deploy-re-review-o/85009/5 "2007-02-19T16:25:01Z")

</div>

Actually, there is!

A few weeks ago I submitted a patch to Nate M.'s backup gem to  
provide S3 as a method for backups. A sample recipe (run on a cron  
job every night) looks like this:

set :backup\_path, “db\_backups” # This is the name of the S3 bucket to  
use (your AWS access key is appened to it for namespace)

set :aws\_access, ‘xxx’ # These can also be set in ENV  
set :aws\_secret, ‘xxx’

action(:content) do  
dump = c[:tmp\_dir] + “/databases.sql”  
sh “mysqldump -u root -pxxx --all-databases \> #{dump}”  
dump  
end

action :deliver, :method =\> :s3  
action :rotate, :method =\> :via\_s3

set :son\_promoted\_on, :fri  
set :father\_promoted\_on, :last\_fri\_of\_the\_month

set :sons\_to\_keep, 7  
set :fathers\_to\_keep, 5  
set :grandfathers\_to\_keep, 12

---

<div class="post-metadata">

**Author:** ![Hendy\_I](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b4bc9f/32.png) [@Hendy\_I](https://www.ruby-forum.com/u/Hendy_I)\
**Post date:** [February 19, 2007, 9:52pm UTC](https://www.ruby-forum.com/t/database-hosting-ala-s3-was-re-rails-deploy-re-review-o/85009/6 "2007-02-19T21:52:48Z")

</div>

This looks pretty darned cool.

I spent a good bit of the evening last night surveying the current  
landscape of what’s possible with Amazon’s EC2 service which, of  
course, relies upon the S3 service as its persistent storage. It’s  
very interesting that they don’t charge for data transferred between  
your EC2 instances and your S3 buckets. The drawback is that you have  
to explicitly tell your instances to store to S3 because an instance’s  
storage is only good for as long as the instance is up-and-running.  
Of course, you could run at least two instances solely for the  
database(s) to achieve replication but I just wouldn’t feel so great  
about letting it all hang out. I feel that the EC2 service is still  
in its infancy and, one of these days, it’ll be a great choice for us  
Rails people…

For right now though, the patch you provided looks pretty cool …  
will definitely have to check it out.

-Chris
