24
Cloud Hosting for PostgreSQL

Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Cloud Hosting for PostgreSQL

Page 2: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Database Hosting Options

● Colocation● Dedicated Server● Virtual Machine● Database as a Service

Page 3: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Finding Your Just Right Hosting

Page 4: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Pssh, that's easy!● Just use EC2!● $COOL_NEW_STARTUP uses it!● I could spin up dozens of databases on-

demand!

Page 5: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

EC2 Caveats

● See Christophe Pettus' PGCon 2012 presentation PostgreSQL on AWS

● Dedicated Instances: base cost at least $7300/month, plus per-instance costs

● Don't trust (ephemeral) instance storage● Beware Regional and Internet Data Transfer

pricing, EBS storage and I/O costs● Does your database use actually fit EC2's

business and cost model?

Page 6: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Choosing a Hosting Provider

● Three main factors to consider:– Stability

– Stability

– Stability

● Beware “too good to be true” or “Unlimited”● Check how long they've been in business,

contact details, office location● Remember: moving your master database is

much trickier than moving a web server.

Page 7: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Options

● Number and speed of CPU cores● Memory, guaranteed vs. burstable● Disk I/O● disk space● 10/100/1000 Mbps, metered or unmetered● data center location● Virtualization method: OpenVZ, Virtuozzo,

Vserver, KVM, Xen, VMWare

Page 8: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

No love for Postgres?

● Hosting providers offer servers customized for:– Game servers

– SEO

– Storing backups

– High bandwidth

– High RAM

– MySQL

● Don't trust your hosting provider to handle e.g. VPS migrations without corruption

Page 9: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Heroku Postgres

● “database as a service”● Crane and Kappa offer great bang for the buck,

BUT:● 1TB max. database size on all offerings● Can't create global objects: stuck with single

default username per-database?● No database superuser● Can't setup replication outside of Heroku

Page 10: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

VPS Toolkit

● bwm-ng: watch out for excessive bandwidth use, especially during backups

● ioping: run for an hour, check max. latency:--- /home/josh/ (simfs /dev/simfs) ioping statistics ---

1515 requests completed in 1550734.6 ms, 44 iops, 0.2 mb/s

min/avg/max/mdev = 0.1/22.9/4521.9/142.1 ms

● Ensure performance is acceptable for your most I/O intensive jobs: stats rollups, backups and restores, CLUSTER, etc.

● Don't forget the hosting provider's dashboard

Page 11: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Ain't gonna happen

Page 12: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Ain't gonna happen #2

Page 13: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Ain't gonna happen #3

Page 14: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Read those TOSs

● You will not engage in any activity that interferes with or disrupts services

● DreamHost Web Hosting servers are not intended as a data backup or archiving service.

● We may suspend... if we determine... may adversely impact the Service Offerings or the systems or Content of any other AWS customer

● Customers may not ... run any “jail-breaking” software that circumvents the restrictions placed on the container by the parent node.

Page 15: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Beware the budget VPS

Page 16: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Beware the Budget VPS #2

“So basically, you've got a broken kernel here: it claimed to give PG circa 135MB of memory, but what's actually there is only about 128MB. I don't see any connection between those numbers and the shmmax/shmall settings, either --- so I think this must be some busted implementation of a VM-level limitation.

I see no Postgres bug here. You need to take this up with your hosting provider, who have given you a faulty kernel.

regards, tom lane

Page 17: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Backups

● Don't trust a single provider with your master database and only set of backups!

● Several hosting providers may colocate in the same datacenter.

● Some providers offer a special backup/storage VPS with generous disk space

● Consider sending backups offshore: NL, DE, FR, UK all have good connectivity and hosting deals

Page 18: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Cost

● Hosting is becoming cheaper rapidly. Don't get locked into multi-year commitments

● Let's look at the history of deals posted on lowendbox

● Beware: many hosting providers who offered great deals are no longer around

Page 19: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk
Page 20: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk
Page 21: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk
Page 22: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk
Page 23: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Further Resources

● vpslist.net: quarterly rankings of VPS providers by performance on I/O and CPU benchmarks

● vpsbenchmarks.net: detailed benchmarks of many VPS providers

● Hostmonk.com: search by price, disk, memory, bandwidth

● lowendbox.com: if you're looking for cheap auxiliary machines

● webhostingtalk.com: look up past experiences with a provider, exclusive deals posted, ask for opinions

Page 24: Cloud Hosting Options for PostgreSQL - KupershmidtSeveral hosting providers may colocate in the same datacenter. Some providers offer a special backup/storage VPS with generous disk

Fin

● Slides available, CC-BY-NC 3.0 license● I'll put data used online shortly● Questions?