SlideShare a Scribd company logo
1 of 30
back4app.com
How much cost Parse self-hosting?
How Much cost Parse self-hosting?
• In this presentation, we are comparing expenses required to host the
complete Parse solution (Parse Server + Database) in two different
configurations.
• The first configuration covers small apps and the second covers scaling / large
apps.
• Small Apps – Will detail the structure required for starting apps with less than
ten requests/second and minimum server-side processing.
• Large and Scaling Apps – Will detail the structure required for scaling and
large apps with more than 10 API requests per second.
How Much cost Parse self-hosting?
• Building a new API and running it on production environment demands not
only dedicated developers but also adequate infrastructure.
• Parse.com is a BaaS – Backend as a Service provider (Infrastructure +
Backend) and hosts the infrastructure at Amazon Web Services cloud.
• The open source version of Parse.com (Parse Server) can be hosted on
various types of infrastructure.
How Much cost Parse self-hosting?
• Parse Server is developed in NodeJS using the Express framework.
• Parse server uses MongoDB with the Mongo Rocks, a proprietary
improvement developed by Parse Team to optimize compression and
performance of MongoDB.
• You can read the original publication on:
http://blog.back4app.com/2016/06/21/parse-aws/
Small Apps < 10 request / second
• The minimum recommended infrastructure to install a Parse app is based on
two different servers.
• One server to run Parse Server + Parse Dashboard and another server to run
the MongoDB (without Mongo Rocks).
• This presentation talks about the minimum infrastructure necessary to run
Parse Open source solution.
Minimum Infrastructure
Small Apps < 10 request / second
• With minimum infrastructure, you can have the servers up and running, but
quality parameters such as performance and availability (also factors such
as backups, redundancy, and recovery) are not considered.
• The infrastructure recommended by Parse.com team is also included at the
end of this article.
Minimum Infrastructure
Description Server Quantity Server Purpose
Parse Server 1
Compute
Optimization
Mongo DB 1 I/O Optimization
Deploying a Small Parse App on Amazon
AWS Infrastructure
• AWS is a secure cloud services platform providing a broad set of
infrastructure products, ranging from bare metal instances to fully managed
solutions.
• Parse.com is hosted on AWS North Virginia.
• Parse team recommends you to use AWS Elastic Beanstalk to host Parse
Server applications.
• With AWS you can not only handle the deployment but also manage vertical
scaling and monitor the usage of the applications developed with Node.JS.
Deploying a Small Parse App on Amazon
AWS Infrastructure
• You retain full control over the AWS resources powering your application
and access the underlying resources at any time.
• There is no additional charge for AWS Elastic Beanstalk and you pay only for
the AWS resources needed to store and run your applications.
• You can launch the AWS Elastic Beanstalk deployment flow.
• There are different pricing for various EC2 instances.
Deploying a Small Parse App on Amazon
AWS Infrastructure
• Amazon offers a free tier (t1.micro instances), but this instance does not
support Parse Server.
• The default instance type will be a t2.small as this is the minimum instance
type determined to run Parse Server, but this instance is more indicated
for testing environments.
Deploying a Small Parse App on Amazon
AWS Infrastructure
• A ‘c4.large’ instance is ideal for the production environment.
• You can quickly change the instance type by going to the ‘Configuration’ tab,
clicking on the ‘Instances’ card, changing the instance type to ‘c4.large’, and
clicking on ‘Apply’.
Deploying a Small Parse App on Amazon
AWS Infrastructure
Deploying a Small Parse App on Amazon
AWS Infrastructure
• On-Demand Instances let you pay for computing capacity by the hour with
no long-term commitments.
• This kind of service frees you from the costs and complexities of planning,
purchasing, and maintaining hardware and transforms what are commonly
large fixed costs into much smaller variable costs.
• For a c4.large, it may typically cost $0.105 per hour.
Deploying a Small Parse App on Amazon
AWS Infrastructure
• Reserved Instances provide you with a significant discount (up to 75%)
compared to On-Demand Instance pricing.
• You can purchase Standard Reserved Instances that are available on an
‘always-on’ (24 x 7) basis, or you can buy Scheduled Reserved Instances to
use on a recurring scheduled basis.
• You can choose between three payment options when you purchase a
Standard Reserved Instance – All Upfront, Partial Upfront, and No Upfront.
Deploying a Small Parse App on Amazon
AWS Infrastructure
• The total cost for one month is the sum of the expense of the running
instances, overall AWS data transfer, Elastic Load Balancers, and the data
processed by the Elastic Load Balancers.
Amazon EC2 Instance Cost = Instance cost per hour X Number of instances X Uptime in hours
Instance cost per hour = $0.105
AWS Data Transfer Cost = (Data in (GB) X Data in Rate) + (Data out (GB) X Data out Rate)
Data out Rate (100GB) = $ 8.91
Total Parse Server monthly cost: $ 76.86
Deploying a Small Parse App on Amazon
AWS Infrastructure
• For the Parse Server database, you need a service that frees you from
managing the underlying infrastructure for your MongoDB instances.
• At this minimum option, we are going to use one only MongoDB instance.
• On AWS we have several EC2 options to host MongoDB going from t1.Micro
to c3.large.
• Additionally, we also have the i2 instances that are the Parse recommended
servers to Mongo Rocks performance, but we also will talk about that on the
next topic.
Deploying a Small Parse App on Amazon
AWS Infrastructure
1. t1.Micro and t1.Small(low memory) – are most used for development and
testing environments, so I don’t recommend.
2. m3.Medium and m3.XLarge(general purpose) – Ideal to start your app
database.
If you need to improve performance you can upgrade memory or high I/O.
We are going to use this option on our self-hosting Option.
Deploying a Small Parse App on Amazon
AWS Infrastructure
3. r3.Large and r3.8xLarge (high Memory)- These instances are the sweet spot
for your MongoDB instances.
They have the right balance of memory and compute power.
They are good candidates to run your larger MongoDB server.
4. I2.xlarge – I2.8xLarge, HS1(high I/O) – These are the “Cadillacs” of the EC2
world and you can run your most demanding MongoDB servers on these
instances.
These instances provide a high amount memory and fast local SSDs.
Deploying a Small Parse App on Amazon
AWS Infrastructure
5. c3.large-c38xlarge(high computing) – These instances provide the best CPU
performance for the price point.
However MongoDB does not need a lot of CPU and we have rarely found
these to be useful.
We prefer the high memory and high IO instances to run our MongoDB
databases.
m3.Large Instance cost per hour = $0.133
Total MongoDB monthly cost: $ 95.13
Small App Total Server Cost
(Parse Server + MongoDB)
• The total cost equals to the sum of one Parse Server c4.large instance plus the cost
of the MongoDB m3.Medium instance.
• Parse Server c4.large + Data Transfer = USD 76.86
• MongoDB m3.medium = USD 97.36
• Data Transfer = USD 8.91
• Total Cost(AWS discount applied) = USD 181.87
• Please note this cost does not cover S3 backups neither a redundant server
structure.
Large scaling Apps
The recommended infrastructure
• Parse.com suggests infrastructure based on replication of Parse Server and
MongoDB.
• The replication consists of two Parse Servers instances and three MongoDB
instances implementing the replicaSet (if you want to build a scalable
structure of MongoDB, you‘ll need to implement charging as well but that
probably needs a new Post to explain more ).
Large scaling Apps
The recommended infrastructure
• Replication is the process of synchronizing data across multiple servers.
• Replication provides redundancy and increases data availability with
multiple copies of data on different database servers.
• Replication protects a database from the loss of a single server.
• It also allows you to recover from hardware failure and service interruptions.
• With additional copies of the data, you can dedicate one to disaster
recovery, reporting, or backup.
Large scaling Apps
The recommended infrastructure
• For Parse Server, the replication process is very simple and consists of two
simple servers that mirror each other.
• They are typically the same and are synchronized to have the same data
always.
• In case one of them fails, the other is still there to support the app’s
requests.
Large scaling Apps
The recommended infrastructure
• MongoDB achieves replication by the use of replica set.
• A replica set is a group of MongoDB instances that host the same data set.
• In a replica one primary node receives all write operations and the other
two instances which are secondary apply operations from the primary so
that they have the same data set.
• Replica set can have only one primary node.
Large scaling Apps
The recommended infrastructure
Large scaling Apps
The recommended infrastructure
• These deployments provide two complete copies of the data set at all times
in addition to the primary.
• These replica sets provide additional fault tolerance and high availability.
• If the primary is unavailable, the replica set elects a secondary to be primary
and continues normal operation.
• The old primary rejoins the set when available.
Large scaling Apps
The recommended infrastructure
Description Server Quantity Server Purpose
Parse Server 1 Compute Optimization
MongoDB-Primary 1
I/O Optimization – Read
and Write
MongoDB-Secondary 2 I/O Optimization – Read
Deploying Large Parse App on AWS
Recommended infrastructure
• On Parse Server side we keep using c4.Large but now with 2 servers in order
to provide mirroring between the application servers.
Amazon EC2 Instance Cost = Instance cost per hour X Number of instances X Uptime in hours
Instance cost per hour = $0.105 AWS Data Transfer Cost = (Data in (GB) X
Data in Rate) + (Data out (GB) X Data out Rate)
Data out Rate (1TB) = $ 183.24
Total Parse Server monthly cost: $ 336.96
Deploying Large Parse App on AWS
Recommended infrastructure
• On the database side we use the MongoRocks required the
infrastructure(suggested by Parse Team).
• Parse runs its MongoDB databases in replica sets that include one primary
and two secondary databases.
• Parse uses Amazon Elastic Block Store (Amazon EBS) to create snapshots
frequently for each MongoDB shard, which is then uploaded to an Amazon
Simple Storage Service (Amazon S3) bucket. If necessary, Parse can bring up
a new node in a matter of minutes using Amazon S3 and join it to a cluster.
Deploying Large Parse App on AWS
Recommended infrastructure
• They also recommend the i2 instances to deploy the MongoDb and a S3
instance to store the backups.
• So we will have 3 i2 instances running the MongoRocksDB. The total cost is
shown bellow:
i2.Large Instance cost per hour = $0.853
s3 Instance(1TB) = $0.0125/GB
Total MongoDB monthly cost: $ 1979.70
Large App Total Server Cost
(Parse Server + MongoDB)
• The total cost equals to the sum of one Parse Server c4.large instance plus
the cost of the MongoDB i2.Large instance plus S3 storage(1TB).
• Parse Server c4.large + Data Transfer = USD 336.96
• MongoDB i2.Large + S3 Storage = USD 1979.70
• Total Cost(AWS discount applied) = USD 2355.02
• Please note this cost cover S3 backups and a redundant server structure.

More Related Content

Viewers also liked

How to build a Pokemon Go App
How to build a Pokemon Go AppHow to build a Pokemon Go App
How to build a Pokemon Go AppCharles Ramos
 
Firebase vs Parse Server - PortuguĂŞs
Firebase vs Parse Server - PortuguĂŞsFirebase vs Parse Server - PortuguĂŞs
Firebase vs Parse Server - PortuguĂŞsCharles Ramos
 
Image Slide ( Animal Companion in Maze )
Image Slide ( Animal Companion in Maze )Image Slide ( Animal Companion in Maze )
Image Slide ( Animal Companion in Maze )tadamasa yamaguchi
 
Final Dissertation
Final DissertationFinal Dissertation
Final DissertationJordan Forshaw
 
Gecko Labs - Our Student Engagement Solutions
Gecko Labs - Our Student Engagement SolutionsGecko Labs - Our Student Engagement Solutions
Gecko Labs - Our Student Engagement SolutionsGecko Labs
 
Denim Garments Quality Control and Inspection Services
Denim Garments Quality Control and Inspection ServicesDenim Garments Quality Control and Inspection Services
Denim Garments Quality Control and Inspection ServicesAsia Quality Control
 

Viewers also liked (6)

How to build a Pokemon Go App
How to build a Pokemon Go AppHow to build a Pokemon Go App
How to build a Pokemon Go App
 
Firebase vs Parse Server - PortuguĂŞs
Firebase vs Parse Server - PortuguĂŞsFirebase vs Parse Server - PortuguĂŞs
Firebase vs Parse Server - PortuguĂŞs
 
Image Slide ( Animal Companion in Maze )
Image Slide ( Animal Companion in Maze )Image Slide ( Animal Companion in Maze )
Image Slide ( Animal Companion in Maze )
 
Final Dissertation
Final DissertationFinal Dissertation
Final Dissertation
 
Gecko Labs - Our Student Engagement Solutions
Gecko Labs - Our Student Engagement SolutionsGecko Labs - Our Student Engagement Solutions
Gecko Labs - Our Student Engagement Solutions
 
Denim Garments Quality Control and Inspection Services
Denim Garments Quality Control and Inspection ServicesDenim Garments Quality Control and Inspection Services
Denim Garments Quality Control and Inspection Services
 

Recently uploaded

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Recently uploaded (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

How much cost parse self hosting?

  • 1. back4app.com How much cost Parse self-hosting?
  • 2. How Much cost Parse self-hosting? • In this presentation, we are comparing expenses required to host the complete Parse solution (Parse Server + Database) in two different configurations. • The first configuration covers small apps and the second covers scaling / large apps. • Small Apps – Will detail the structure required for starting apps with less than ten requests/second and minimum server-side processing. • Large and Scaling Apps – Will detail the structure required for scaling and large apps with more than 10 API requests per second.
  • 3. How Much cost Parse self-hosting? • Building a new API and running it on production environment demands not only dedicated developers but also adequate infrastructure. • Parse.com is a BaaS – Backend as a Service provider (Infrastructure + Backend) and hosts the infrastructure at Amazon Web Services cloud. • The open source version of Parse.com (Parse Server) can be hosted on various types of infrastructure.
  • 4. How Much cost Parse self-hosting? • Parse Server is developed in NodeJS using the Express framework. • Parse server uses MongoDB with the Mongo Rocks, a proprietary improvement developed by Parse Team to optimize compression and performance of MongoDB. • You can read the original publication on: http://blog.back4app.com/2016/06/21/parse-aws/
  • 5. Small Apps < 10 request / second • The minimum recommended infrastructure to install a Parse app is based on two different servers. • One server to run Parse Server + Parse Dashboard and another server to run the MongoDB (without Mongo Rocks). • This presentation talks about the minimum infrastructure necessary to run Parse Open source solution. Minimum Infrastructure
  • 6. Small Apps < 10 request / second • With minimum infrastructure, you can have the servers up and running, but quality parameters such as performance and availability (also factors such as backups, redundancy, and recovery) are not considered. • The infrastructure recommended by Parse.com team is also included at the end of this article. Minimum Infrastructure Description Server Quantity Server Purpose Parse Server 1 Compute Optimization Mongo DB 1 I/O Optimization
  • 7. Deploying a Small Parse App on Amazon AWS Infrastructure • AWS is a secure cloud services platform providing a broad set of infrastructure products, ranging from bare metal instances to fully managed solutions. • Parse.com is hosted on AWS North Virginia. • Parse team recommends you to use AWS Elastic Beanstalk to host Parse Server applications. • With AWS you can not only handle the deployment but also manage vertical scaling and monitor the usage of the applications developed with Node.JS.
  • 8. Deploying a Small Parse App on Amazon AWS Infrastructure • You retain full control over the AWS resources powering your application and access the underlying resources at any time. • There is no additional charge for AWS Elastic Beanstalk and you pay only for the AWS resources needed to store and run your applications. • You can launch the AWS Elastic Beanstalk deployment flow. • There are different pricing for various EC2 instances.
  • 9. Deploying a Small Parse App on Amazon AWS Infrastructure • Amazon offers a free tier (t1.micro instances), but this instance does not support Parse Server. • The default instance type will be a t2.small as this is the minimum instance type determined to run Parse Server, but this instance is more indicated for testing environments.
  • 10. Deploying a Small Parse App on Amazon AWS Infrastructure • A ‘c4.large’ instance is ideal for the production environment. • You can quickly change the instance type by going to the ‘Configuration’ tab, clicking on the ‘Instances’ card, changing the instance type to ‘c4.large’, and clicking on ‘Apply’.
  • 11. Deploying a Small Parse App on Amazon AWS Infrastructure
  • 12. Deploying a Small Parse App on Amazon AWS Infrastructure • On-Demand Instances let you pay for computing capacity by the hour with no long-term commitments. • This kind of service frees you from the costs and complexities of planning, purchasing, and maintaining hardware and transforms what are commonly large fixed costs into much smaller variable costs. • For a c4.large, it may typically cost $0.105 per hour.
  • 13. Deploying a Small Parse App on Amazon AWS Infrastructure • Reserved Instances provide you with a significant discount (up to 75%) compared to On-Demand Instance pricing. • You can purchase Standard Reserved Instances that are available on an ‘always-on’ (24 x 7) basis, or you can buy Scheduled Reserved Instances to use on a recurring scheduled basis. • You can choose between three payment options when you purchase a Standard Reserved Instance – All Upfront, Partial Upfront, and No Upfront.
  • 14. Deploying a Small Parse App on Amazon AWS Infrastructure • The total cost for one month is the sum of the expense of the running instances, overall AWS data transfer, Elastic Load Balancers, and the data processed by the Elastic Load Balancers. Amazon EC2 Instance Cost = Instance cost per hour X Number of instances X Uptime in hours Instance cost per hour = $0.105 AWS Data Transfer Cost = (Data in (GB) X Data in Rate) + (Data out (GB) X Data out Rate) Data out Rate (100GB) = $ 8.91 Total Parse Server monthly cost: $ 76.86
  • 15. Deploying a Small Parse App on Amazon AWS Infrastructure • For the Parse Server database, you need a service that frees you from managing the underlying infrastructure for your MongoDB instances. • At this minimum option, we are going to use one only MongoDB instance. • On AWS we have several EC2 options to host MongoDB going from t1.Micro to c3.large. • Additionally, we also have the i2 instances that are the Parse recommended servers to Mongo Rocks performance, but we also will talk about that on the next topic.
  • 16. Deploying a Small Parse App on Amazon AWS Infrastructure 1. t1.Micro and t1.Small(low memory) – are most used for development and testing environments, so I don’t recommend. 2. m3.Medium and m3.XLarge(general purpose) – Ideal to start your app database. If you need to improve performance you can upgrade memory or high I/O. We are going to use this option on our self-hosting Option.
  • 17. Deploying a Small Parse App on Amazon AWS Infrastructure 3. r3.Large and r3.8xLarge (high Memory)- These instances are the sweet spot for your MongoDB instances. They have the right balance of memory and compute power. They are good candidates to run your larger MongoDB server. 4. I2.xlarge – I2.8xLarge, HS1(high I/O) – These are the “Cadillacs” of the EC2 world and you can run your most demanding MongoDB servers on these instances. These instances provide a high amount memory and fast local SSDs.
  • 18. Deploying a Small Parse App on Amazon AWS Infrastructure 5. c3.large-c38xlarge(high computing) – These instances provide the best CPU performance for the price point. However MongoDB does not need a lot of CPU and we have rarely found these to be useful. We prefer the high memory and high IO instances to run our MongoDB databases. m3.Large Instance cost per hour = $0.133 Total MongoDB monthly cost: $ 95.13
  • 19. Small App Total Server Cost (Parse Server + MongoDB) • The total cost equals to the sum of one Parse Server c4.large instance plus the cost of the MongoDB m3.Medium instance. • Parse Server c4.large + Data Transfer = USD 76.86 • MongoDB m3.medium = USD 97.36 • Data Transfer = USD 8.91 • Total Cost(AWS discount applied) = USD 181.87 • Please note this cost does not cover S3 backups neither a redundant server structure.
  • 20. Large scaling Apps The recommended infrastructure • Parse.com suggests infrastructure based on replication of Parse Server and MongoDB. • The replication consists of two Parse Servers instances and three MongoDB instances implementing the replicaSet (if you want to build a scalable structure of MongoDB, you‘ll need to implement charging as well but that probably needs a new Post to explain more ).
  • 21. Large scaling Apps The recommended infrastructure • Replication is the process of synchronizing data across multiple servers. • Replication provides redundancy and increases data availability with multiple copies of data on different database servers. • Replication protects a database from the loss of a single server. • It also allows you to recover from hardware failure and service interruptions. • With additional copies of the data, you can dedicate one to disaster recovery, reporting, or backup.
  • 22. Large scaling Apps The recommended infrastructure • For Parse Server, the replication process is very simple and consists of two simple servers that mirror each other. • They are typically the same and are synchronized to have the same data always. • In case one of them fails, the other is still there to support the app’s requests.
  • 23. Large scaling Apps The recommended infrastructure • MongoDB achieves replication by the use of replica set. • A replica set is a group of MongoDB instances that host the same data set. • In a replica one primary node receives all write operations and the other two instances which are secondary apply operations from the primary so that they have the same data set. • Replica set can have only one primary node.
  • 24. Large scaling Apps The recommended infrastructure
  • 25. Large scaling Apps The recommended infrastructure • These deployments provide two complete copies of the data set at all times in addition to the primary. • These replica sets provide additional fault tolerance and high availability. • If the primary is unavailable, the replica set elects a secondary to be primary and continues normal operation. • The old primary rejoins the set when available.
  • 26. Large scaling Apps The recommended infrastructure Description Server Quantity Server Purpose Parse Server 1 Compute Optimization MongoDB-Primary 1 I/O Optimization – Read and Write MongoDB-Secondary 2 I/O Optimization – Read
  • 27. Deploying Large Parse App on AWS Recommended infrastructure • On Parse Server side we keep using c4.Large but now with 2 servers in order to provide mirroring between the application servers. Amazon EC2 Instance Cost = Instance cost per hour X Number of instances X Uptime in hours Instance cost per hour = $0.105 AWS Data Transfer Cost = (Data in (GB) X Data in Rate) + (Data out (GB) X Data out Rate) Data out Rate (1TB) = $ 183.24 Total Parse Server monthly cost: $ 336.96
  • 28. Deploying Large Parse App on AWS Recommended infrastructure • On the database side we use the MongoRocks required the infrastructure(suggested by Parse Team). • Parse runs its MongoDB databases in replica sets that include one primary and two secondary databases. • Parse uses Amazon Elastic Block Store (Amazon EBS) to create snapshots frequently for each MongoDB shard, which is then uploaded to an Amazon Simple Storage Service (Amazon S3) bucket. If necessary, Parse can bring up a new node in a matter of minutes using Amazon S3 and join it to a cluster.
  • 29. Deploying Large Parse App on AWS Recommended infrastructure • They also recommend the i2 instances to deploy the MongoDb and a S3 instance to store the backups. • So we will have 3 i2 instances running the MongoRocksDB. The total cost is shown bellow: i2.Large Instance cost per hour = $0.853 s3 Instance(1TB) = $0.0125/GB Total MongoDB monthly cost: $ 1979.70
  • 30. Large App Total Server Cost (Parse Server + MongoDB) • The total cost equals to the sum of one Parse Server c4.large instance plus the cost of the MongoDB i2.Large instance plus S3 storage(1TB). • Parse Server c4.large + Data Transfer = USD 336.96 • MongoDB i2.Large + S3 Storage = USD 1979.70 • Total Cost(AWS discount applied) = USD 2355.02 • Please note this cost cover S3 backups and a redundant server structure.

Editor's Notes

  1. Davi
  2. Alysson
  3. Alysson
  4. Alysson
  5. Alysson
  6. Alysson
  7. Alysson
  8. Alysson
  9. Alysson
  10. Alysson
  11. Alysson
  12. Alysson
  13. Alysson
  14. Alysson
  15. Alysson
  16. Alysson
  17. Alysson
  18. Alysson
  19. Alysson
  20. Alysson
  21. Alysson
  22. Alysson
  23. Alysson
  24. Alysson
  25. Alysson
  26. Alysson
  27. Alysson
  28. Alysson
  29. Alysson
  30. Alysson