SlideShare a Scribd company logo
1 of 39
Download to read offline
Designing	
  your	
  SaaS	
  Database	
  
for	
  Scale	
  with	
  Postgres	
  
Lukas	
  Fi9l	
  
Ozgun	
  Erdogan	
  
What	
  is	
  Citus?	
  
•  Citus	
  extends	
  PostgreSQL	
  (not	
  a	
  fork)	
  to	
  
provide	
  it	
  with	
  distributed	
  funcGonality.	
  
•  Citus	
  scales-­‐out	
  Postgres	
  across	
  servers	
  using	
  
sharding	
  and	
  replicaGon.	
  Its	
  query	
  engine	
  
parallelizes	
  SQL	
  queries	
  across	
  many	
  servers.	
  
•  Citus	
  is	
  open	
  source:	
  
h9ps://github.com/citusdata/citus	
  
	
  
When	
  is	
  Citus	
  a	
  good	
  fit?	
  
Three	
  common	
  use-­‐cases:	
  
	
  
1.  MulG-­‐tenant	
  database:	
  Citus	
  allows	
  you	
  to	
  scale	
  out	
  
your	
  mulG-­‐tenant	
  (B2B)	
  database	
  to	
  100K+	
  tenants.	
  
2.  Real-­‐Gme	
  analyGcs:	
  Citus	
  enables	
  ingesGng	
  large	
  
volumes	
  of	
  data	
  and	
  running	
  analyGcal	
  queries	
  on	
  
that	
  in	
  human	
  real-­‐Gme.	
  
3.  NoSQL++:	
  If	
  you	
  have	
  high	
  ingest	
  requirements	
  of	
  
500K/sec,	
  Citus	
  can	
  help	
  you	
  combine	
  the	
  power	
  of	
  
structured	
  and	
  semi-­‐structured	
  data.	
  
Talk	
  Outline	
  
	
  
1.  Scaling	
  Databases	
  
2.  MulG-­‐tenant	
  (SaaS)	
  databases	
  
3.  Data	
  Modeling	
  
4.  How	
  to	
  Scale	
  MulG-­‐tenant	
  databases	
  
5.  ApplicaGon	
  IntegraGon	
  
6.  Demo	
  
7.  Q	
  &	
  A	
  
What	
  does	
  it	
  mean	
  to	
  “scale”?	
  
•  Scaling:	
  AllocaGng	
  more	
  resources	
  to	
  your	
  
applicaGon	
  or	
  database	
  to	
  improve	
  
performance.	
  
•  Scaling	
  databases	
  is	
  harder	
  than	
  scaling	
  apps.	
  
•  Types	
  of	
  resources	
  you	
  can	
  scale:	
  
1.  Soeware	
  resources:	
  ConnecGons,	
  number	
  of	
  
processes	
  
2.  Hardware	
  resources:	
  CPU,	
  memory,	
  and	
  storage	
  
Scaling	
  Up	
  Hardware	
  
	
  
	
  
PostgreSQL	
  
Database	
  
r3.xlarge	
  
PostgreSQL	
  
Database	
  
r3.4xlarge	
  
4	
  vCPUs	
  
30	
  GB	
  RAM	
  
80	
  GB	
  SSD	
  
16	
  vCPUs	
  
120	
  GB	
  RAM	
  
320	
  GB	
  SSD	
  
Scaling	
  Out	
  Hardware	
  
	
  
	
  
Node	
  #1	
  	
  
	
  
PostgreSQL	
  
ApplicaGon	
  
(Ruby,	
  Pyhton,	
  Java,	
  …)	
  
Node	
  #8	
  
	
  
PostgreSQL	
  
	
  
…….	
  
Node	
  #7	
  
	
  
PostgreSQL	
  
	
  
When	
  is	
  the	
  right	
  Gme	
  to	
  scale	
  out	
  
•  Scaling	
  up	
  is	
  easier	
  than	
  scaling	
  out.	
  If	
  you	
  can	
  
throw	
  more	
  hardware	
  at	
  the	
  problem,	
  that’s	
  
the	
  easiest	
  way	
  to	
  scale.	
  
•  Also	
  tune	
  your	
  database:	
  
h9p://pgconfsv.com/postgresql-­‐when-­‐its-­‐not-­‐
your-­‐day-­‐job	
  
•  When	
  is	
  the	
  right	
  Gme	
  to	
  start	
  thinking	
  about	
  
scaling	
  out?	
  
HeurisGc	
  #1	
  on	
  when	
  to	
  scale	
  
•  Your	
  SaaS	
  business	
  is	
  growing,	
  you’re	
  on	
  the	
  
second	
  largest	
  instance	
  type	
  available	
  on	
  your	
  
cloud	
  /	
  infrastructure	
  provider	
  
•  Example	
  Gpping	
  points	
  
– We	
  signed	
  a	
  big	
  customer,	
  and	
  now	
  all	
  our	
  
customers	
  are	
  hurGng	
  
– One-­‐off	
  operaGonal	
  queries	
  are	
  bringing	
  the	
  
database	
  to	
  a	
  halt	
  
– We	
  expect	
  to	
  grow	
  by	
  10x	
  next	
  year	
  
HeurisGc	
  #2	
  
•  Even	
  aeer	
  tuning,	
  PostgreSQL’s	
  autovacuum	
  
daemon	
  can’t	
  catch	
  up	
  with	
  our	
  write	
  traffic	
  
	
  
HeurisGc	
  #3	
  
•  Databases	
  will	
  cache	
  recent	
  and	
  frequently	
  
accessed	
  data	
  in	
  memory	
  for	
  you	
  
•  The	
  database	
  will	
  track	
  how	
  oeen	
  you	
  use	
  the	
  
cache	
  and	
  hit	
  disk	
  
•  For	
  OLTP	
  applicaGons,	
  most	
  of	
  your	
  working	
  
set	
  should	
  be	
  fulfilled	
  from	
  the	
  cache	
  
– Look	
  to	
  serve	
  99%	
  from	
  the	
  cache	
  
HeurisGc	
  #3	
  –	
  cache	
  hit	
  raGo	
  query	
  
Source:	
  Heroku	
  -­‐-­‐	
  Determining	
  Cache	
  Size	
  	
  
Plan	
  ahead	
  
•  Plan	
  ahead,	
  opGmize	
  queries,	
  and	
  don’t	
  wait	
  
unGl	
  there	
  isn’t	
  another	
  opGon	
  
	
  
•  When	
  it’s	
  Gme	
  to	
  scale	
  out,	
  you	
  need	
  to	
  be9er	
  
understand	
  your	
  workload.	
  
1.  B2B	
  (mulG-­‐tenant	
  databases)	
  or	
  B2C	
  applicaGons	
  
2.  TransacGonal	
  (OLTP)	
  or	
  analyGcal	
  (OLAP)	
  
What	
  is	
  a	
  mulG-­‐tenant	
  database	
  
•  If	
  you’re	
  building	
  a	
  B2B	
  applicaGon,	
  you	
  
already	
  have	
  the	
  noGon	
  of	
  tenancy	
  built	
  into	
  
your	
  data	
  model	
  
•  B2B	
  applicaGons	
  that	
  serve	
  other	
  tenants	
  /	
  
accounts	
  /	
  organizaGons	
  use	
  mulG-­‐tenant	
  dbs	
  
–  Physical	
  service	
  providers.	
  For	
  example,	
  food	
  services	
  to	
  
other	
  businesses	
  
–  Digital	
  service	
  providers:	
  AdverGsing,	
  markeGng,	
  and	
  sales	
  
automaGon	
  
	
  
Trends	
  in	
  scaling	
  mulG-­‐tenant	
  apps	
  
•  MulG-­‐tenant	
  databases	
  were	
  commonplace	
  in	
  
on-­‐premises	
  
•  SaaS	
  applicaGons	
  introduced	
  the	
  moGvaGon	
  
to	
  scale	
  further	
  
– Cloud	
  enables	
  serving	
  many	
  smaller	
  tenants	
  
– Instead	
  of	
  dozens	
  of	
  tenants,	
  new	
  SaaS	
  apps	
  reach	
  
to	
  and	
  handle	
  1K-­‐100K	
  tenants	
  
– Storage	
  is	
  cheap:	
  You	
  can	
  store	
  events	
  or	
  track	
  a	
  
field’s	
  history	
  
Google	
  F1	
  –	
  An	
  Example	
  
•  Google	
  F1	
  is	
  an	
  example	
  that	
  demonstrates	
  a	
  
mulG-­‐tenant	
  database.	
  
•  AdWords	
  serves	
  more	
  than	
  1M	
  tenants.	
  
•  F1	
  leverages	
  key	
  relaGonal	
  database	
  features:	
  
– TransacGons	
  
– Joins	
  –	
  avoid	
  data	
  duplicaGon	
  
– Primary	
  and	
  foreign	
  key	
  constraints	
  
Data	
  modeling	
  for	
  mulG-­‐tenant	
  
Key	
  Insight	
  
•  If	
  you	
  shard	
  your	
  tables	
  on	
  their	
  primary	
  key	
  
(in	
  the	
  relaGonal	
  model),	
  then	
  distributed	
  
transacGons,	
  joins,	
  and	
  foreign	
  key	
  constraints	
  
become	
  expensive.	
  
	
  
•  Model	
  your	
  tables	
  using	
  the	
  hierarchical	
  
database	
  model	
  by	
  adding	
  tenant_id.	
  This	
  
colocates	
  data	
  for	
  the	
  same	
  tenant	
  together	
  
and	
  dramaGcally	
  reduces	
  cost.	
  
Concept	
  of	
  co-­‐locaGon	
  
Does	
  everything	
  fit	
  into	
  hierarchical?	
  
•  What	
  happens	
  if	
  I	
  have	
  a	
  table	
  that	
  doesn’t	
  fit	
  
into	
  the	
  hierarchical	
  database	
  model?	
  
1.  Large	
  table	
  outside	
  the	
  hierarchy:	
  Orgs	
  and	
  
users	
  that	
  are	
  shared	
  across	
  orgs	
  
–  Shard	
  on	
  different	
  column	
  and	
  don’t	
  join	
  
2.  Small	
  table	
  that	
  is	
  common	
  to	
  hierarchy	
  
–  Create	
  reference	
  table	
  replicated	
  across	
  all	
  
nodes	
  
Scaling	
  MulG-­‐tenant	
  Databases	
  
•  How	
  to	
  do	
  you	
  scale	
  your	
  mulG-­‐tenant	
  
database?	
  
•  Three	
  high	
  level	
  opGons:	
  
1.  Create	
  one	
  database	
  per	
  tenant	
  
2.  Create	
  one	
  schema	
  per	
  tenant	
  
3.  Have	
  all	
  tenants	
  share	
  the	
  same	
  tables	
  (and	
  
parGGon	
  /	
  shard	
  tables)	
  
Create	
  one	
  database	
  per	
  tenant	
  
Tenant	
  5	
  	
   Tenant	
  1251	
  	
   Tenant	
  1252	
  	
  
Create	
  one	
  database	
  per	
  tenant	
  
•  Create	
  a	
  separate	
  database	
  for	
  each	
  tenant	
  
	
  
•  IsolaGon	
  of	
  tenants	
  and	
  more	
  predictable	
  
compliance	
  story	
  
•  DBA	
  responsible	
  for	
  managing	
  separate	
  
databases	
  and	
  resource	
  allocaGon	
  between	
  
them	
  
	
  
Create	
  one	
  schema	
  per	
  tenant	
  
Database	
  
Tenant	
  5	
  	
   Tenant	
  1251	
  	
  
Tenant	
  1252	
  	
  
Create	
  one	
  schema	
  per	
  tenant	
  
•  Create	
  a	
  separate	
  namespace	
  (schema)	
  for	
  
each	
  tenant	
  
	
  
•  Isolate	
  data	
  /	
  queries	
  for	
  one	
  tenant	
  in	
  a	
  
schema.	
  Make	
  be9er	
  use	
  of	
  resources	
  than	
  
the	
  “one	
  database	
  per	
  tenant”	
  model	
  
	
  
Have	
  all	
  tenants	
  share	
  the	
  same	
  tables	
  
Accounts	
  
Campaigns	
  
Leads	
   TenantId	
  
5	
  
5	
  
5	
  
1251	
  
Database	
  
Have	
  all	
  tenants	
  share	
  the	
  same	
  tables	
  
•  Have	
  all	
  tenants	
  share	
  the	
  same	
  tables	
  by	
  
adding	
  a	
  tenant_id	
  column	
  (and	
  shard)	
  
	
  
•  Requires	
  the	
  applicaGon	
  to	
  control	
  access	
  to	
  
database,	
  or	
  row	
  based	
  access	
  controls	
  
•  Scales	
  to	
  1K-­‐100K	
  tenants	
  through	
  be9er	
  
resource	
  sharing	
  and	
  simplifies	
  operaGons	
  and	
  
maintenance	
  
	
  
Rule	
  of	
  thumb	
  (simplified)	
  
•  Each	
  design	
  opGon	
  can	
  address	
  quesGons	
  
around	
  scale	
  and	
  isolaGon	
  with	
  enough	
  effort.	
  
What’s	
  the	
  primary	
  criteria	
  for	
  you	
  app?	
  
•  If	
  you’re	
  building	
  for	
  scale:	
  Have	
  all	
  tenants	
  
share	
  the	
  same	
  table(s)	
  
•  If	
  you’re	
  building	
  for	
  isolaGon:	
  Create	
  one	
  
database	
  per	
  tenant	
  
Scaling:	
  Resources	
  
•  If	
  you	
  create	
  a	
  separate	
  database	
  /	
  schema	
  for	
  
each	
  tenant,	
  you	
  need	
  to	
  allocate	
  resources	
  to	
  
that	
  database.	
  
•  Hardware:	
  disk,	
  memory,	
  cpu,	
  and	
  network	
  
management	
  
•  Database	
  soeware:	
  shared_buffers,	
  
connecGon	
  counts,	
  backend	
  processes	
  
•  ORM	
  soeware:	
  Cached	
  informaGon	
  about	
  
databases	
  /	
  schemas	
  
Scaling:	
  OperaGonal	
  Simplicity	
  	
  
•  Your	
  database	
  grows	
  with	
  your	
  SaaS	
  
applicaGon.	
  
•  Schema	
  changes	
  (Alter	
  Table	
  …	
  Add	
  Column)	
  
and	
  index	
  creaGons	
  (Create	
  Index)	
  are	
  
common	
  operaGons.	
  
•  What	
  happens	
  when	
  you	
  have	
  10K	
  tenants	
  
and	
  you	
  changed	
  the	
  schema	
  for	
  5,000	
  of	
  
those	
  tenants	
  and	
  observed	
  a	
  failure?	
  
FAQ:	
  How	
  does	
  largest	
  tenant	
  impact	
  scale?	
  
•  MulG-­‐tenant	
  databases	
  usually	
  follow	
  a	
  Zipf	
  /	
  
Power	
  law	
  distribuGon	
  
FAQ:	
  How	
  does	
  largest	
  tenant	
  impact	
  scale?	
  
•  What	
  percentage	
  of	
  the	
  total	
  data	
  size	
  
belongs	
  to	
  the	
  largest	
  tenant?	
  
•  Guidelines	
  around	
  a	
  standard	
  Zipf	
  distribuGon	
  
and	
  different	
  tenant	
  counts:	
  
– 10	
  tenants:	
  Largest	
  tenant	
  holds	
  60%	
  of	
  data	
  (*)	
  
– 10K	
  tenants:	
  Largest	
  tenant	
  holds	
  2%	
  of	
  data	
  (*)	
  
•  Look	
  at	
  your	
  data’s	
  distribuGon	
  to	
  make	
  
informed	
  scaling	
  decisions	
  
FAQ:	
  Data	
  that	
  varies	
  across	
  tenants	
  
•  What	
  about	
  data	
  that	
  varies	
  across	
  tenants?	
  
•  Different	
  tenants	
  /	
  organizaGons	
  may	
  have	
  
their	
  own	
  needs	
  that	
  a	
  rigid	
  data	
  model	
  won’t	
  
be	
  able	
  to	
  address.	
  
•  One	
  organizaGon	
  may	
  need	
  to	
  track	
  their	
  
stores	
  in	
  the	
  US	
  through	
  their	
  zip	
  codes.	
  
Another	
  customer	
  in	
  Europe	
  may	
  only	
  want	
  to	
  
keep	
  tax	
  raGos	
  for	
  each	
  store.	
  
FAQ:	
  Salesforce	
  Architecture	
  
•  If	
  your	
  tenants	
  share	
  the	
  same	
  table(s),	
  one	
  
approach	
  is	
  creaGng	
  a	
  huge	
  table	
  with	
  many	
  
string	
  columns	
  (Value0,	
  Value1,	
  …,	
  Value500).	
  	
  
	
  
	
  
(*)	
  Salesforce’s	
  mulG-­‐tenant	
  arch:	
  www.developerforce.com/media/
ForcedotcomBookLibrary/Force.com_MulGtenancy_WP_101508.pdf	
  
FAQ:	
  Semi-­‐structured	
  data	
  types	
  
•  PostgreSQL	
  has	
  powerful	
  semi-­‐structured	
  data	
  
types:	
  hstore,	
  json,	
  and	
  jsonb.	
  These	
  data	
  
types	
  can	
  express	
  scalar,	
  array,	
  and	
  nested	
  
fields.	
  
	
  
ApplicaGon	
  IntegraGon	
  
•  Citus	
  follows	
  the	
  “shared	
  tables”	
  approach	
  
that	
  easily	
  scales	
  to	
  100K+	
  tenants	
  with	
  
minimal	
  applicaGon	
  changes.	
  
	
  
•  For	
  example	
  applicaGon	
  integraGon:	
  
github.com/citusdata/acGverecord-­‐mulG-­‐
tenant	
  
MulG-­‐tenant	
  Database	
  Demo	
  
	
  
•  <<	
  MulG-­‐tenant	
  (B2B)	
  Database	
  Demo	
  >>	
  
– Tenant	
  isolaGon	
  
– Reference	
  tables	
  
– Online	
  shard	
  rebalancing	
  
Summary	
  
•  You	
  can	
  verGcally	
  or	
  horizontally	
  scale	
  your	
  
database.	
  Several	
  heurisGcs	
  help	
  in	
  deciding	
  the	
  
right	
  Gme	
  to	
  horizontally	
  scale.	
  
•  To	
  scale	
  out	
  a	
  mulG-­‐tenant	
  (B2B)	
  database,	
  
picking	
  the	
  right	
  distribuGon	
  column	
  and	
  table	
  
colocaGon	
  are	
  key.	
  
•  There	
  are	
  three	
  design	
  pa9erns	
  to	
  scaling	
  out	
  a	
  
mulG-­‐tenant	
  database.	
  The	
  “shared	
  tables”	
  
approach	
  offers	
  the	
  best	
  scaling	
  characterisGcs.	
  
Q	
  &	
  A	
  
	
  
	
  
QuesGons	
  
	
  
www.citusdata.com/get_started	
  

More Related Content

What's hot

Gruter TECHDAY 2014 Realtime Processing in Telco
Gruter TECHDAY 2014 Realtime Processing in TelcoGruter TECHDAY 2014 Realtime Processing in Telco
Gruter TECHDAY 2014 Realtime Processing in TelcoGruter
 
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsightOptimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsightHBaseCon
 
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...DataStax
 
Designing & Optimizing Micro Batching Systems Using 100+ Nodes (Ananth Ram, R...
Designing & Optimizing Micro Batching Systems Using 100+ Nodes (Ananth Ram, R...Designing & Optimizing Micro Batching Systems Using 100+ Nodes (Ananth Ram, R...
Designing & Optimizing Micro Batching Systems Using 100+ Nodes (Ananth Ram, R...DataStax
 
Micro-batching: High-performance Writes (Adam Zegelin, Instaclustr) | Cassand...
Micro-batching: High-performance Writes (Adam Zegelin, Instaclustr) | Cassand...Micro-batching: High-performance Writes (Adam Zegelin, Instaclustr) | Cassand...
Micro-batching: High-performance Writes (Adam Zegelin, Instaclustr) | Cassand...DataStax
 
AWS June Webinar Series - Getting Started: Amazon Redshift
AWS June Webinar Series - Getting Started: Amazon RedshiftAWS June Webinar Series - Getting Started: Amazon Redshift
AWS June Webinar Series - Getting Started: Amazon RedshiftAmazon Web Services
 
Everyday I’m scaling... Cassandra
Everyday I’m scaling... CassandraEveryday I’m scaling... Cassandra
Everyday I’m scaling... CassandraInstaclustr
 
Gruter_TECHDAY_2014_03_ApacheTajo (in Korean)
Gruter_TECHDAY_2014_03_ApacheTajo (in Korean)Gruter_TECHDAY_2014_03_ApacheTajo (in Korean)
Gruter_TECHDAY_2014_03_ApacheTajo (in Korean)Gruter
 
Big Data Camp LA 2014 - Apache Tajo: A Big Data Warehouse System on Hadoop
Big Data Camp LA 2014 - Apache Tajo: A Big Data Warehouse System on HadoopBig Data Camp LA 2014 - Apache Tajo: A Big Data Warehouse System on Hadoop
Big Data Camp LA 2014 - Apache Tajo: A Big Data Warehouse System on HadoopGruter
 
Amazon RedShift - Ianni Vamvadelis
Amazon RedShift - Ianni VamvadelisAmazon RedShift - Ianni Vamvadelis
Amazon RedShift - Ianni Vamvadelishuguk
 
Conquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard queryConquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard queryJustin Swanhart
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tPGConf APAC
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure DataTaro L. Saito
 
Shard-Query, an MPP database for the cloud using the LAMP stack
Shard-Query, an MPP database for the cloud using the LAMP stackShard-Query, an MPP database for the cloud using the LAMP stack
Shard-Query, an MPP database for the cloud using the LAMP stackJustin Swanhart
 
AWS July Webinar Series: Amazon Redshift Optimizing Performance
AWS July Webinar Series: Amazon Redshift Optimizing PerformanceAWS July Webinar Series: Amazon Redshift Optimizing Performance
AWS July Webinar Series: Amazon Redshift Optimizing PerformanceAmazon Web Services
 
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New FeaturesAmazon Web Services
 
How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case Kai Sasaki
 
Divide and conquer in the cloud
Divide and conquer in the cloudDivide and conquer in the cloud
Divide and conquer in the cloudJustin Swanhart
 

What's hot (20)

Gruter TECHDAY 2014 Realtime Processing in Telco
Gruter TECHDAY 2014 Realtime Processing in TelcoGruter TECHDAY 2014 Realtime Processing in Telco
Gruter TECHDAY 2014 Realtime Processing in Telco
 
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsightOptimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
 
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...
Running 400-node Cassandra + Spark Clusters in Azure (Anubhav Kale, Microsoft...
 
Designing & Optimizing Micro Batching Systems Using 100+ Nodes (Ananth Ram, R...
Designing & Optimizing Micro Batching Systems Using 100+ Nodes (Ananth Ram, R...Designing & Optimizing Micro Batching Systems Using 100+ Nodes (Ananth Ram, R...
Designing & Optimizing Micro Batching Systems Using 100+ Nodes (Ananth Ram, R...
 
Micro-batching: High-performance Writes (Adam Zegelin, Instaclustr) | Cassand...
Micro-batching: High-performance Writes (Adam Zegelin, Instaclustr) | Cassand...Micro-batching: High-performance Writes (Adam Zegelin, Instaclustr) | Cassand...
Micro-batching: High-performance Writes (Adam Zegelin, Instaclustr) | Cassand...
 
AWS June Webinar Series - Getting Started: Amazon Redshift
AWS June Webinar Series - Getting Started: Amazon RedshiftAWS June Webinar Series - Getting Started: Amazon Redshift
AWS June Webinar Series - Getting Started: Amazon Redshift
 
Everyday I’m scaling... Cassandra
Everyday I’m scaling... CassandraEveryday I’m scaling... Cassandra
Everyday I’m scaling... Cassandra
 
What's New in Amazon Aurora
What's New in Amazon AuroraWhat's New in Amazon Aurora
What's New in Amazon Aurora
 
Gruter_TECHDAY_2014_03_ApacheTajo (in Korean)
Gruter_TECHDAY_2014_03_ApacheTajo (in Korean)Gruter_TECHDAY_2014_03_ApacheTajo (in Korean)
Gruter_TECHDAY_2014_03_ApacheTajo (in Korean)
 
Big Data Camp LA 2014 - Apache Tajo: A Big Data Warehouse System on Hadoop
Big Data Camp LA 2014 - Apache Tajo: A Big Data Warehouse System on HadoopBig Data Camp LA 2014 - Apache Tajo: A Big Data Warehouse System on Hadoop
Big Data Camp LA 2014 - Apache Tajo: A Big Data Warehouse System on Hadoop
 
Amazon RedShift - Ianni Vamvadelis
Amazon RedShift - Ianni VamvadelisAmazon RedShift - Ianni Vamvadelis
Amazon RedShift - Ianni Vamvadelis
 
Conquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard queryConquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard query
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’t
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure Data
 
Compression talk
Compression talkCompression talk
Compression talk
 
Shard-Query, an MPP database for the cloud using the LAMP stack
Shard-Query, an MPP database for the cloud using the LAMP stackShard-Query, an MPP database for the cloud using the LAMP stack
Shard-Query, an MPP database for the cloud using the LAMP stack
 
AWS July Webinar Series: Amazon Redshift Optimizing Performance
AWS July Webinar Series: Amazon Redshift Optimizing PerformanceAWS July Webinar Series: Amazon Redshift Optimizing Performance
AWS July Webinar Series: Amazon Redshift Optimizing Performance
 
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
(DAT402) Amazon RDS PostgreSQL:Lessons Learned & New Features
 
How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case
 
Divide and conquer in the cloud
Divide and conquer in the cloudDivide and conquer in the cloud
Divide and conquer in the cloud
 

Similar to Designing your SaaS Database for Scale with Postgres

SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople
 
Estimating the Total Costs of Your Cloud Analytics Platform 
Estimating the Total Costs of Your Cloud Analytics Platform Estimating the Total Costs of Your Cloud Analytics Platform 
Estimating the Total Costs of Your Cloud Analytics Platform DATAVERSITY
 
AWS Big Data in everyday use at Yle
AWS Big Data in everyday use at YleAWS Big Data in everyday use at Yle
AWS Big Data in everyday use at YleRolf Koski
 
Understanding cloud with Google Cloud Platform
Understanding cloud with Google Cloud PlatformUnderstanding cloud with Google Cloud Platform
Understanding cloud with Google Cloud PlatformDr. Ketan Parmar
 
Big Data Analytics on the Cloud Oracle Applications AWS Redshift & Tableau
Big Data Analytics on the Cloud Oracle Applications AWS Redshift & TableauBig Data Analytics on the Cloud Oracle Applications AWS Redshift & Tableau
Big Data Analytics on the Cloud Oracle Applications AWS Redshift & TableauSam Palani
 
Managing Large Amounts of Data with Salesforce
Managing Large Amounts of Data with SalesforceManaging Large Amounts of Data with Salesforce
Managing Large Amounts of Data with SalesforceSense Corp
 
Ankus, bigdata deployment and orchestration framework
Ankus, bigdata deployment and orchestration frameworkAnkus, bigdata deployment and orchestration framework
Ankus, bigdata deployment and orchestration frameworkAshrith Mekala
 
ADV Slides: When and How Data Lakes Fit into a Modern Data Architecture
ADV Slides: When and How Data Lakes Fit into a Modern Data ArchitectureADV Slides: When and How Data Lakes Fit into a Modern Data Architecture
ADV Slides: When and How Data Lakes Fit into a Modern Data ArchitectureDATAVERSITY
 
Cignex mongodb-sharding-mongodbdays
Cignex mongodb-sharding-mongodbdaysCignex mongodb-sharding-mongodbdays
Cignex mongodb-sharding-mongodbdaysMongoDB APAC
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native PlatformSunil Govindan
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native PlatformSunil Govindan
 
Making Hadoop Realtime by Dr. William Bain of Scaleout Software
Making Hadoop Realtime by Dr. William Bain of Scaleout SoftwareMaking Hadoop Realtime by Dr. William Bain of Scaleout Software
Making Hadoop Realtime by Dr. William Bain of Scaleout SoftwareData Con LA
 
An overview of modern scalable web development
An overview of modern scalable web developmentAn overview of modern scalable web development
An overview of modern scalable web developmentTung Nguyen
 
Benchmark Showdown: Which Relational Database is the Fastest on AWS?
Benchmark Showdown: Which Relational Database is the Fastest on AWS?Benchmark Showdown: Which Relational Database is the Fastest on AWS?
Benchmark Showdown: Which Relational Database is the Fastest on AWS?Clustrix
 
Cloud nativecomputingtechnologysupportinghpc cognitiveworkflows
Cloud nativecomputingtechnologysupportinghpc cognitiveworkflowsCloud nativecomputingtechnologysupportinghpc cognitiveworkflows
Cloud nativecomputingtechnologysupportinghpc cognitiveworkflowsYong Feng
 

Similar to Designing your SaaS Database for Scale with Postgres (20)

SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud Computing
 
Estimating the Total Costs of Your Cloud Analytics Platform 
Estimating the Total Costs of Your Cloud Analytics Platform Estimating the Total Costs of Your Cloud Analytics Platform 
Estimating the Total Costs of Your Cloud Analytics Platform 
 
AWS Big Data in everyday use at Yle
AWS Big Data in everyday use at YleAWS Big Data in everyday use at Yle
AWS Big Data in everyday use at Yle
 
Mongo db intro.pptx
Mongo db intro.pptxMongo db intro.pptx
Mongo db intro.pptx
 
Understanding cloud with Google Cloud Platform
Understanding cloud with Google Cloud PlatformUnderstanding cloud with Google Cloud Platform
Understanding cloud with Google Cloud Platform
 
Big Data Analytics on the Cloud Oracle Applications AWS Redshift & Tableau
Big Data Analytics on the Cloud Oracle Applications AWS Redshift & TableauBig Data Analytics on the Cloud Oracle Applications AWS Redshift & Tableau
Big Data Analytics on the Cloud Oracle Applications AWS Redshift & Tableau
 
Big data nyu
Big data nyuBig data nyu
Big data nyu
 
Managing Large Amounts of Data with Salesforce
Managing Large Amounts of Data with SalesforceManaging Large Amounts of Data with Salesforce
Managing Large Amounts of Data with Salesforce
 
BigData Hadoop
BigData Hadoop BigData Hadoop
BigData Hadoop
 
Ankus, bigdata deployment and orchestration framework
Ankus, bigdata deployment and orchestration frameworkAnkus, bigdata deployment and orchestration framework
Ankus, bigdata deployment and orchestration framework
 
ADV Slides: When and How Data Lakes Fit into a Modern Data Architecture
ADV Slides: When and How Data Lakes Fit into a Modern Data ArchitectureADV Slides: When and How Data Lakes Fit into a Modern Data Architecture
ADV Slides: When and How Data Lakes Fit into a Modern Data Architecture
 
Cignex mongodb-sharding-mongodbdays
Cignex mongodb-sharding-mongodbdaysCignex mongodb-sharding-mongodbdays
Cignex mongodb-sharding-mongodbdays
 
Cloud Computing 101
Cloud Computing 101Cloud Computing 101
Cloud Computing 101
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native Platform
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native Platform
 
Making Hadoop Realtime by Dr. William Bain of Scaleout Software
Making Hadoop Realtime by Dr. William Bain of Scaleout SoftwareMaking Hadoop Realtime by Dr. William Bain of Scaleout Software
Making Hadoop Realtime by Dr. William Bain of Scaleout Software
 
Dataweek-Talk-2014
Dataweek-Talk-2014Dataweek-Talk-2014
Dataweek-Talk-2014
 
An overview of modern scalable web development
An overview of modern scalable web developmentAn overview of modern scalable web development
An overview of modern scalable web development
 
Benchmark Showdown: Which Relational Database is the Fastest on AWS?
Benchmark Showdown: Which Relational Database is the Fastest on AWS?Benchmark Showdown: Which Relational Database is the Fastest on AWS?
Benchmark Showdown: Which Relational Database is the Fastest on AWS?
 
Cloud nativecomputingtechnologysupportinghpc cognitiveworkflows
Cloud nativecomputingtechnologysupportinghpc cognitiveworkflowsCloud nativecomputingtechnologysupportinghpc cognitiveworkflows
Cloud nativecomputingtechnologysupportinghpc cognitiveworkflows
 

Recently uploaded

DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...amitlee9823
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramMoniSankarHazra
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...amitlee9823
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsJoseMangaJr1
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...amitlee9823
 
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...amitlee9823
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
hybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptxhybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptx9to5mart
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Delhi Call girls
 

Recently uploaded (20)

DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics Program
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
 
hybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptxhybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptx
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 

Designing your SaaS Database for Scale with Postgres

  • 1. Designing  your  SaaS  Database   for  Scale  with  Postgres   Lukas  Fi9l   Ozgun  Erdogan  
  • 2. What  is  Citus?   •  Citus  extends  PostgreSQL  (not  a  fork)  to   provide  it  with  distributed  funcGonality.   •  Citus  scales-­‐out  Postgres  across  servers  using   sharding  and  replicaGon.  Its  query  engine   parallelizes  SQL  queries  across  many  servers.   •  Citus  is  open  source:   h9ps://github.com/citusdata/citus    
  • 3. When  is  Citus  a  good  fit?   Three  common  use-­‐cases:     1.  MulG-­‐tenant  database:  Citus  allows  you  to  scale  out   your  mulG-­‐tenant  (B2B)  database  to  100K+  tenants.   2.  Real-­‐Gme  analyGcs:  Citus  enables  ingesGng  large   volumes  of  data  and  running  analyGcal  queries  on   that  in  human  real-­‐Gme.   3.  NoSQL++:  If  you  have  high  ingest  requirements  of   500K/sec,  Citus  can  help  you  combine  the  power  of   structured  and  semi-­‐structured  data.  
  • 4. Talk  Outline     1.  Scaling  Databases   2.  MulG-­‐tenant  (SaaS)  databases   3.  Data  Modeling   4.  How  to  Scale  MulG-­‐tenant  databases   5.  ApplicaGon  IntegraGon   6.  Demo   7.  Q  &  A  
  • 5. What  does  it  mean  to  “scale”?   •  Scaling:  AllocaGng  more  resources  to  your   applicaGon  or  database  to  improve   performance.   •  Scaling  databases  is  harder  than  scaling  apps.   •  Types  of  resources  you  can  scale:   1.  Soeware  resources:  ConnecGons,  number  of   processes   2.  Hardware  resources:  CPU,  memory,  and  storage  
  • 6. Scaling  Up  Hardware       PostgreSQL   Database   r3.xlarge   PostgreSQL   Database   r3.4xlarge   4  vCPUs   30  GB  RAM   80  GB  SSD   16  vCPUs   120  GB  RAM   320  GB  SSD  
  • 7. Scaling  Out  Hardware       Node  #1       PostgreSQL   ApplicaGon   (Ruby,  Pyhton,  Java,  …)   Node  #8     PostgreSQL     …….   Node  #7     PostgreSQL    
  • 8. When  is  the  right  Gme  to  scale  out   •  Scaling  up  is  easier  than  scaling  out.  If  you  can   throw  more  hardware  at  the  problem,  that’s   the  easiest  way  to  scale.   •  Also  tune  your  database:   h9p://pgconfsv.com/postgresql-­‐when-­‐its-­‐not-­‐ your-­‐day-­‐job   •  When  is  the  right  Gme  to  start  thinking  about   scaling  out?  
  • 9. HeurisGc  #1  on  when  to  scale   •  Your  SaaS  business  is  growing,  you’re  on  the   second  largest  instance  type  available  on  your   cloud  /  infrastructure  provider   •  Example  Gpping  points   – We  signed  a  big  customer,  and  now  all  our   customers  are  hurGng   – One-­‐off  operaGonal  queries  are  bringing  the   database  to  a  halt   – We  expect  to  grow  by  10x  next  year  
  • 10. HeurisGc  #2   •  Even  aeer  tuning,  PostgreSQL’s  autovacuum   daemon  can’t  catch  up  with  our  write  traffic    
  • 11. HeurisGc  #3   •  Databases  will  cache  recent  and  frequently   accessed  data  in  memory  for  you   •  The  database  will  track  how  oeen  you  use  the   cache  and  hit  disk   •  For  OLTP  applicaGons,  most  of  your  working   set  should  be  fulfilled  from  the  cache   – Look  to  serve  99%  from  the  cache  
  • 12. HeurisGc  #3  –  cache  hit  raGo  query   Source:  Heroku  -­‐-­‐  Determining  Cache  Size    
  • 13. Plan  ahead   •  Plan  ahead,  opGmize  queries,  and  don’t  wait   unGl  there  isn’t  another  opGon     •  When  it’s  Gme  to  scale  out,  you  need  to  be9er   understand  your  workload.   1.  B2B  (mulG-­‐tenant  databases)  or  B2C  applicaGons   2.  TransacGonal  (OLTP)  or  analyGcal  (OLAP)  
  • 14. What  is  a  mulG-­‐tenant  database   •  If  you’re  building  a  B2B  applicaGon,  you   already  have  the  noGon  of  tenancy  built  into   your  data  model   •  B2B  applicaGons  that  serve  other  tenants  /   accounts  /  organizaGons  use  mulG-­‐tenant  dbs   –  Physical  service  providers.  For  example,  food  services  to   other  businesses   –  Digital  service  providers:  AdverGsing,  markeGng,  and  sales   automaGon    
  • 15. Trends  in  scaling  mulG-­‐tenant  apps   •  MulG-­‐tenant  databases  were  commonplace  in   on-­‐premises   •  SaaS  applicaGons  introduced  the  moGvaGon   to  scale  further   – Cloud  enables  serving  many  smaller  tenants   – Instead  of  dozens  of  tenants,  new  SaaS  apps  reach   to  and  handle  1K-­‐100K  tenants   – Storage  is  cheap:  You  can  store  events  or  track  a   field’s  history  
  • 16. Google  F1  –  An  Example   •  Google  F1  is  an  example  that  demonstrates  a   mulG-­‐tenant  database.   •  AdWords  serves  more  than  1M  tenants.   •  F1  leverages  key  relaGonal  database  features:   – TransacGons   – Joins  –  avoid  data  duplicaGon   – Primary  and  foreign  key  constraints  
  • 17. Data  modeling  for  mulG-­‐tenant  
  • 18. Key  Insight   •  If  you  shard  your  tables  on  their  primary  key   (in  the  relaGonal  model),  then  distributed   transacGons,  joins,  and  foreign  key  constraints   become  expensive.     •  Model  your  tables  using  the  hierarchical   database  model  by  adding  tenant_id.  This   colocates  data  for  the  same  tenant  together   and  dramaGcally  reduces  cost.  
  • 20. Does  everything  fit  into  hierarchical?   •  What  happens  if  I  have  a  table  that  doesn’t  fit   into  the  hierarchical  database  model?   1.  Large  table  outside  the  hierarchy:  Orgs  and   users  that  are  shared  across  orgs   –  Shard  on  different  column  and  don’t  join   2.  Small  table  that  is  common  to  hierarchy   –  Create  reference  table  replicated  across  all   nodes  
  • 21. Scaling  MulG-­‐tenant  Databases   •  How  to  do  you  scale  your  mulG-­‐tenant   database?   •  Three  high  level  opGons:   1.  Create  one  database  per  tenant   2.  Create  one  schema  per  tenant   3.  Have  all  tenants  share  the  same  tables  (and   parGGon  /  shard  tables)  
  • 22. Create  one  database  per  tenant   Tenant  5     Tenant  1251     Tenant  1252    
  • 23. Create  one  database  per  tenant   •  Create  a  separate  database  for  each  tenant     •  IsolaGon  of  tenants  and  more  predictable   compliance  story   •  DBA  responsible  for  managing  separate   databases  and  resource  allocaGon  between   them    
  • 24. Create  one  schema  per  tenant   Database   Tenant  5     Tenant  1251     Tenant  1252    
  • 25. Create  one  schema  per  tenant   •  Create  a  separate  namespace  (schema)  for   each  tenant     •  Isolate  data  /  queries  for  one  tenant  in  a   schema.  Make  be9er  use  of  resources  than   the  “one  database  per  tenant”  model    
  • 26. Have  all  tenants  share  the  same  tables   Accounts   Campaigns   Leads   TenantId   5   5   5   1251   Database  
  • 27. Have  all  tenants  share  the  same  tables   •  Have  all  tenants  share  the  same  tables  by   adding  a  tenant_id  column  (and  shard)     •  Requires  the  applicaGon  to  control  access  to   database,  or  row  based  access  controls   •  Scales  to  1K-­‐100K  tenants  through  be9er   resource  sharing  and  simplifies  operaGons  and   maintenance    
  • 28. Rule  of  thumb  (simplified)   •  Each  design  opGon  can  address  quesGons   around  scale  and  isolaGon  with  enough  effort.   What’s  the  primary  criteria  for  you  app?   •  If  you’re  building  for  scale:  Have  all  tenants   share  the  same  table(s)   •  If  you’re  building  for  isolaGon:  Create  one   database  per  tenant  
  • 29. Scaling:  Resources   •  If  you  create  a  separate  database  /  schema  for   each  tenant,  you  need  to  allocate  resources  to   that  database.   •  Hardware:  disk,  memory,  cpu,  and  network   management   •  Database  soeware:  shared_buffers,   connecGon  counts,  backend  processes   •  ORM  soeware:  Cached  informaGon  about   databases  /  schemas  
  • 30. Scaling:  OperaGonal  Simplicity     •  Your  database  grows  with  your  SaaS   applicaGon.   •  Schema  changes  (Alter  Table  …  Add  Column)   and  index  creaGons  (Create  Index)  are   common  operaGons.   •  What  happens  when  you  have  10K  tenants   and  you  changed  the  schema  for  5,000  of   those  tenants  and  observed  a  failure?  
  • 31. FAQ:  How  does  largest  tenant  impact  scale?   •  MulG-­‐tenant  databases  usually  follow  a  Zipf  /   Power  law  distribuGon  
  • 32. FAQ:  How  does  largest  tenant  impact  scale?   •  What  percentage  of  the  total  data  size   belongs  to  the  largest  tenant?   •  Guidelines  around  a  standard  Zipf  distribuGon   and  different  tenant  counts:   – 10  tenants:  Largest  tenant  holds  60%  of  data  (*)   – 10K  tenants:  Largest  tenant  holds  2%  of  data  (*)   •  Look  at  your  data’s  distribuGon  to  make   informed  scaling  decisions  
  • 33. FAQ:  Data  that  varies  across  tenants   •  What  about  data  that  varies  across  tenants?   •  Different  tenants  /  organizaGons  may  have   their  own  needs  that  a  rigid  data  model  won’t   be  able  to  address.   •  One  organizaGon  may  need  to  track  their   stores  in  the  US  through  their  zip  codes.   Another  customer  in  Europe  may  only  want  to   keep  tax  raGos  for  each  store.  
  • 34. FAQ:  Salesforce  Architecture   •  If  your  tenants  share  the  same  table(s),  one   approach  is  creaGng  a  huge  table  with  many   string  columns  (Value0,  Value1,  …,  Value500).         (*)  Salesforce’s  mulG-­‐tenant  arch:  www.developerforce.com/media/ ForcedotcomBookLibrary/Force.com_MulGtenancy_WP_101508.pdf  
  • 35. FAQ:  Semi-­‐structured  data  types   •  PostgreSQL  has  powerful  semi-­‐structured  data   types:  hstore,  json,  and  jsonb.  These  data   types  can  express  scalar,  array,  and  nested   fields.    
  • 36. ApplicaGon  IntegraGon   •  Citus  follows  the  “shared  tables”  approach   that  easily  scales  to  100K+  tenants  with   minimal  applicaGon  changes.     •  For  example  applicaGon  integraGon:   github.com/citusdata/acGverecord-­‐mulG-­‐ tenant  
  • 37. MulG-­‐tenant  Database  Demo     •  <<  MulG-­‐tenant  (B2B)  Database  Demo  >>   – Tenant  isolaGon   – Reference  tables   – Online  shard  rebalancing  
  • 38. Summary   •  You  can  verGcally  or  horizontally  scale  your   database.  Several  heurisGcs  help  in  deciding  the   right  Gme  to  horizontally  scale.   •  To  scale  out  a  mulG-­‐tenant  (B2B)  database,   picking  the  right  distribuGon  column  and  table   colocaGon  are  key.   •  There  are  three  design  pa9erns  to  scaling  out  a   mulG-­‐tenant  database.  The  “shared  tables”   approach  offers  the  best  scaling  characterisGcs.  
  • 39. Q  &  A       QuesGons     www.citusdata.com/get_started