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

More from George Batschinski

Stripe payment integration with Android app
Stripe payment integration with Android appStripe payment integration with Android app
Stripe payment integration with Android appGeorge Batschinski
 
Swift to send Push Notifications with Parse Dashboard and
Swift to send Push Notifications with Parse Dashboard and Swift to send Push Notifications with Parse Dashboard and
Swift to send Push Notifications with Parse Dashboard and George Batschinski
 
Send SMS using twilio with cloud code
Send SMS using twilio with cloud codeSend SMS using twilio with cloud code
Send SMS using twilio with cloud codeGeorge Batschinski
 

More from George Batschinski (8)

Backend as a service
Backend as a serviceBackend as a service
Backend as a service
 
Firebase x Back4App
Firebase x Back4AppFirebase x Back4App
Firebase x Back4App
 
How to reduce AWS costs?
How to reduce AWS costs?How to reduce AWS costs?
How to reduce AWS costs?
 
Firebase Alternatives
Firebase AlternativesFirebase Alternatives
Firebase Alternatives
 
Stripe payment integration with Android app
Stripe payment integration with Android appStripe payment integration with Android app
Stripe payment integration with Android app
 
Parse Server x Firebase
Parse Server x FirebaseParse Server x Firebase
Parse Server x Firebase
 
Swift to send Push Notifications with Parse Dashboard and
Swift to send Push Notifications with Parse Dashboard and Swift to send Push Notifications with Parse Dashboard and
Swift to send Push Notifications with Parse Dashboard and
 
Send SMS using twilio with cloud code
Send SMS using twilio with cloud codeSend SMS using twilio with cloud code
Send SMS using twilio with cloud code
 

Recently uploaded

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Recently uploaded (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Parse Server - AWS Self Hosting Costs

  • 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