
Citus Cloud 2, Postgres, and Scaling Without Compromise - bgentry
https://www.citusdata.com/blog/2017/11/16/citus-cloud-2-postgres-and-scale-without-compromise/
======
samk117
These guys need to add a cheap/freemium tier so small-time developers can
scale up their services from nothing. $99/month for their trying-it-
out/developer plan is a bit overreaching.

~~~
craigkerstiens
Using Citus on that small of a plan generally isn't ideal. If you're just
starting out single node Postgres works great and there are a lot of options
for single node Postgres such as Heroku, RDS, and now Google and Azure. Citus
really starts to benefit you later on when you grow, hence our higher entry
level.

As for trying it out, we bill based on usage just like if you were on any
other large cloud provider so you only page for what you use. In that case
trying out a dev cluster for a few hours would be just a few cents.

~~~
samk117
I appreciate your response, but my point is this: people are going to go with
the service that they can scale up from $5/month to $28,000/month without any
interruptions or switching of providers. It would be great to see you guys try
to tackle this problem with that in mind, and I think you could do it really
well. I just think you underestimate how many people want their infrastructure
to cost nothing when they are in pre-launch mode, and will let their pre-
launch infrastructure dictate their post-launch.

To reiterate: I get that your service doesn't start to scale well until the
$99/month price point, but I don't care about performance until I'm at that
price point anyway. I'd rather have the ability to start from nothing with
OK/crappy performance, then have to switch services right when my product
starts getting traction. It's about continuity and scaling up from nothing.

~~~
doh
This is not a bad advice overall, but I think that Citus has still a huge
market to conquer before they go down this path.

Single PG node can handle easily 80k/s writes and reads and store up to 3TB of
data safely. Wast majority of companies will never have to think about cluster
as this is more than sufficient for most.

No matter if it's Citus or any other DB, horizontal scaling comes at cost and
most companies should pay it. Citus helps to the ones that really have issues
with performance beyond those levels (like us) and I think the Citus team is
smartly targeting those kind of customers, at least for the time being.

~~~
qaq
3TB? even on crap option like RDS up to 6TB is OK. You can get generic box
with 200+ cores (actual cores not vCPUs) and 12TB of RAM from SuperMicro.

~~~
doh
You can go to as high as the box allows you to go (GCE allows I believe up to
10TB per server), but the performance will suffer.

~~~
chucky_z
I would add the caveat that it depends on your data heavily.

I supported a 20TB single-node DB, and it worked just fine. We had a lot of
cold data though (about 10TB of it was solely for historical records, and
9.5TB of the rest was only accessed 4x yearly for massive reports).

The hardest part was never postgresql, mainly in numa related stuff.

------
jimbokun
Now that Cockroach supports the "PostgreSQL Wire Protocol", how does it
compare to CitusDB for scaling a relational data model in a distributed
environment?

[https://www.cockroachlabs.com/docs/stable/architecture/sql-l...](https://www.cockroachlabs.com/docs/stable/architecture/sql-
layer.html#postgresql-wire-protocol)

~~~
ozgune
(Ozgun from Citus)

Citus extends PostgreSQL to make it a distributed database. In comparison,
Cockroach builds the entire database from scratch and provides over the wire
compatibility. For our users, this means that they get the following benefits.

1\. PostgreSQL Features

I can think of the following features that our customers started using as they
landed into core Postgres (there's probably many more):

* Rich data types. For example, jsonb, hstore, XML, and HyperLogLog

* Declarative partitioning. You can shard your tables and then partition them

* Performance improvements. Postgres 10 improves analytical query performance by 30-40%, and PG 11 will add another 3x. For Citus customers, they will get these performance benefits at scale.

2\. Application Integration

If you already have an app built on Postgres, migrating to Citus should be
significantly easier than moving to a new database. Some benefits I can think
of are:

* You can pg_dump your Postgres schema and data. You can then load this data into Citus.

* If you need live migrations, you can use Citus Warp to stream changes from your Postgres database to Citus

* Native integration with hundreds of tools already in the Postgres world - data visualization, monitoring, backups, upgrades, and app frameworks such as Rails and Django.

3\. Organizational Skills

Since Citus extends (it's practically) Postgres, you benefit from
organizational skills created worldwide by running millions of Postgres
applications.

All know-how around how to configure your Postgres database, when to create
indexes and database constraints, and how to tune your queries directly
applies to Citus.

I hope this helps. If this doesn't help clarify things, could you let me know?

~~~
MuffinFlavored
> * Performance improvements. Postgres 10 improves analytical query
> performance by 30-40%, and PG 11 will add another 3x. For Citus customers,
> they will get these performance benefits at scale.

When is that to be expected or even usable in beta?

~~~
manigandham
Postgres 10 is out now, that's what's running when you start a new Citus Cloud
cluster. Postgres 11 is in progress, you can always follow the official
releases on the main site:
[https://www.postgresql.org](https://www.postgresql.org)

------
qaq
No offense but pricing looks high to get a solution that will outperform
vanilla PG on i3.16xlarge one is looking at 29K/month? I am afraid to imagine
what a solution that can outperform vanilla PG on maxed out SuperMicro
7089P-TR4T would cost.

~~~
user5994461
A pair of i3.16xlarge is around $8K a month, so it's not exactly cheap either.

~~~
qaq
5K with 1 year reserved pricing (you are not generally throwing away your db
each month)

------
lobster_johnson
Looks awesome! But it seems that this is AWS only. For companies on Google
Cloud, will you be offering a GCP version?

~~~
craigkerstiens
We're always continuing to evaluate other cloud providers to run our fully
managed database as a service on (so stay tuned...) That said, because Citus
the extension is open source as well as licensed for the enterprise version
you can take it and run it yourself today on GCP or Azure or any other cloud
of your choosing. And in fact we do have a number of customers running and
managing Citus themselves on top of GCP.

~~~
lobster_johnson
Thanks. I know it's open source, but Citus Cloud isn't, so presumably you
don't get the extra functionality -- backups, replicas ("followers"),
snapshots etc.

We are going to use CloudSQL once it exits beta, but it's a fairly
conservative Postgres implementation (single node with read slaves), and you
can't install third-party extensions (Citus is not available).

~~~
craigkerstiens
Yeah, fully understand. With any luck we have a better option for you soon :)

------
MightySCollins
Please stop making your product more awesome. It would solve our scaling
issues it's just above our price range right now :( I want an unlimited DevOps
budget then I can also see AWS for more server.

~~~
craigkerstiens
Ha, thanks for the kind words. If there ever are questions around
sizing/pricing just let us know, often happy to at least try to do what we can
there.

------
bzillins
If the rebalancer leverages an update from PostgreSQL 10 does that mean new
Citus formations are now PG10 based?

~~~
craigkerstiens
Yep, newly created formations on Citus Cloud will be PG10 and the latest
version of Citus. For any existing customers on PG 9.6 and older versions of
Citus we'll be upgrading those that opt in. Our upgrade process leverages our
underlying disaster recovery and high availability infrastructure[1] so we can
generally upgrade an entire cluster regardless of data size in under a couple
of minutes.

[1] [https://www.citusdata.com/blog/2017/03/23/a-look-into-
disast...](https://www.citusdata.com/blog/2017/03/23/a-look-into-disaster-
recovery-and-high-availability-and-how-they-work-with-postgres-on-citus-
cloud/)

------
samk117
Can I generally use off-the-shelf postgresql bindings in most languages with
CitusDB, or are there things about CitusDB that would require custom bindings?
If the latter is true, for what languages are bindings available
(ruby/node.js/crystal...)?

~~~
craigkerstiens
The off the shelf Postgres drivers work. We're a pure Postgres extension so
you don't need anything exotic there just a standard Postgres driver. When it
comes to the application side of things it depends a little bit more there on
how you may structure your queries. To help out there we have a few libraries
(for Rails[1] and Django[2]) and more coming.

[1] [https://www.citusdata.com/blog/2017/11/14/scale-out-your-
dja...](https://www.citusdata.com/blog/2017/11/14/scale-out-your-django-app-
with-django-multi-tenant/)

[2] [https://github.com/citusdata/activerecord-multi-
tenant](https://github.com/citusdata/activerecord-multi-tenant)

