Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2019
    Posts
    38

    Question Best server setup to start and scale SaaS?

    Hello folks - hope you're well...

    What kind of server arrangement would you recommend for someone who wants to start and gradually scale a SaaS (software as a service)?

    For example, let's say they have an online app.

    People login to the app, use it, and then logout.

    More users will be added to the app over time.

    The performance (and speed) of the app shouldn't be affected for existing users, as more people start using the app.

    Let's assume the app starts with a handful of users.

    But, over time, the app becomes *really* successful - which requires many concurrent MySQL database calls, etc.

    We wouldn't want to start overpaying for hosting when starting, but wouldn't like to later have to move to a different server either.

    Maybe Amazon EC2 or AWS - or something similar would fit the bill?

    Anything else one should keep in mind?

    Thanks!

  2. #2
    I would go for the following solution in a Dedicated Server environment.

    2 x Dedicated Servers (ESXI or KVM)
    2 x VM PfSense Cluster (CARP)
    1 x Load Balancer (HaProxy) or Similar
    2 x VM Web Servers (RSYNC Available)
    2 x VM Database servers (GaleraDB or Similar)

    Offsite Backup to Cloud based agent similar to Acronis Cyber Cloud offering.

    I hope that's a starting point for you

  3. #3
    Join Date
    Jul 2006
    Location
    Lake Zurich, IL
    Posts
    436
    This isn't a single server question, and EC2 isn't going to do anything to help you scale by itself. The application needs to be designed from the ground up to scale, if you plan to scale to a "really successful" level (millions of users). This typically requires using a scalable storage technology, such as Cassandra, and not MySQL. MySQL has its limits. Even with sharding, you will ultimately run into scalability issues with MySQL. A Galera cluster is nice, but writes are not scalable, and the application must assume that data is eventually consistent, so you might as well concentrate on using something designed for scale, such as Cassandra.

    Now - if the application is simple, and does not require a lot of writes to a database, you can likely get away with a simpler design with a Galera cluster with large memory nodes, and large, or numerous, web servers, both behind capable load balancers.

    To provide additional information, we would need to know much more about the application. Have you started developing this?
    Genesis Hosting Solutions, LLC (genesishosting.com)
    Genesis Public Cloud - No Compromise On-Demand OpenStack infrastructure
    Genesis VMs - Easy to provision single VMs on our Genesis Public Cloud
    Compare us against others at vpsbenchmarks.com!

  4. #4
    Join Date
    Nov 2012
    Posts
    67
    Quote Originally Posted by erickmiller View Post
    This isn't a single server question, and EC2 isn't going to do anything to help you scale by itself. The application needs to be designed from the ground up to scale, if you plan to scale to a "really successful" level (millions of users). This typically requires using a scalable storage technology, such as Cassandra, and not MySQL. MySQL has its limits. Even with sharding, you will ultimately run into scalability issues with MySQL. A Galera cluster is nice, but writes are not scalable, and the application must assume that data is eventually consistent, so you might as well concentrate on using something designed for scale, such as Cassandra.
    Another vote for Cassandra instead of MySql. If you need to scale NoSql DBs are far more reliable and much easier to deal with then MySQL.

    As for setup as erickmiller mentioned if you don't or haven't designed the app to scale yet its something you really need to consider, is this app always going to need a connection, is there any local data stored or cached or is it all streamed live while in use. As you grow beyond a few thousand users these can become large issues if you have say... 25,000 users attempt to send even a small amount of data at the same time. So keep that all in mind when trying to determine what you need to load balance the users.

    It can be hard to even attempt to recommend a setup with out far more detailed information. Is the app latency sensitive? Is the data streamed live as mentioned before? Are you running a webserver or is it a custom app server? What type of traffic is this, TCP or UDP?
    Central Wisconsin MSP for 20 Years
    Customized Hosting Solutions
    DDOS Protected Services (Including GRE Tunnels)
    PM Me for details.

  5. #5
    Join Date
    Sep 2015
    Location
    Austin, TX
    Posts
    1,370
    That very reason you put starts growing is why a lot of startup app companies went with something like AWS or Azure. While they are cheap and easy to get setup and going down the line will cost you a heck of a lot more.

    If you have something that you think will really take off. Then I would make sure that you have a good CTO part of the team to help plan.

    While its just getting started I would go with a dedicated server or cloud based server that can be scaled as your app grows.

    I would be planning on building your own cloud of servers. You can either lease them or buy outright if you have the funds. Yes doing this will have more upfront start up cost but in the long term play could save you Millions. Example look at Dropbox once they moved back to there own setup and off amazon they saved a ton.

    Don't be fast to pull the trigger on something. Research and plan and get the right partners.
    THG - Ingenuity Cloud Services

    50+ Data Centers - 35Tbps+ Network Capacity - 130,000+ Customers Worldwide
    Skype: live:eedb3e8faa853d2d

  6. #6
    Join Date
    Aug 2019
    Posts
    38
    Thank you all so much for the responses.

    Quote Originally Posted by erickmiller View Post
    The application needs to be designed from the ground up to scale, if you plan to scale to a "really successful" level (millions of users). This typically requires using a scalable storage technology, such as Cassandra, and not MySQL.
    Quote Originally Posted by Adept-Stealth View Post
    Another vote for Cassandra instead of MySql. If you need to scale NoSql DBs are far more reliable and much easier to deal with then MySQL.
    So, the main concern isn't so much the hosting itself, but the database, because that will become the main bottleneck in the end, right?

    So, if I'm leasing a dedi server (which I am), can Casandra be installed in one of the cPanels and have the app be installed there?

    And... if Cassandra is so much better (and it's Open Source and free), how come it's not the default option? Does MySQL have any advantages over Cassandra?

    Also, what about the gradually growing needs in storage, RAM etc? Should I go with cloud hosting?

    Quote Originally Posted by erickmiller View Post
    To provide additional information, we would need to know much more about the application. Have you started developing this?
    I have not. I have several ideas. But I'd like to understand the technical stuff first, so I can see as much of the big picture as possible, upfront.

    Sorry for the many questions, btw!

    Thanks!

  7. #7
    Join Date
    Apr 2000
    Location
    Brisbane, Australia
    Posts
    2,602
    Quote Originally Posted by Prometheus-X View Post
    Thank you all so much for the responses.

    And... if Cassandra is so much better (and it's Open Source and free), how come it's not the default option? Does MySQL have any advantages over Cassandra?

    Thanks!
    Comes down to the right tool for the job. The defaults don't necessarily mean the right tool for end users usage scenario.

    Cassandra is up there https://db-engines.com/en/ranking

    But your choice of technology will be limited by your know-how and knowledge of how to use it and also to who you pay/hire to develop and maintain it.

    I mainly use MariaDB MySQL myself but started playing with Clickhouse seeing as Cloudflare folks have a lot of good things to say about Clickhouse https://clickhouse.tech/. Like

    - http://mafiree.com/blogs.php?ref=Ben...-Vs-Clickhouse
    - https://www.percona.com/blog/2017/02...mnar-database/
    - https://www.percona.com/blog/2017/03...-apache-spark/
    - https://www.percona.com/blog/2020/02...tter-together/
    - Percona has a few blog articles covering Clickhouse too https://www.percona.com/blog/tag/clickhouse/

    https://db-engines.com/en/system/Cassandra%3BClickHouse

    Again, it comes down to the right tool for the job. For your SaaS app, you may end up with different databases for different usage cases.

    If your SaaS application is for profit endeavour and you want the right setup to start with, probably good idea to hire professionals like Percona folks to consult for you to getting the right tool for the job.
    Last edited by eva2000; 10-24-2020 at 01:37 PM.
    : CentminMod.com Nginx Installer Nginx 1.25, PHP-FPM, MariaDB 10 CentOS (AlmaLinux/Rocky testing)
    : Centmin Mod Latest Beta Nginx HTTP/2 HTTPS & HTTP/3 QUIC HTTPS supports TLS 1.3 via OpenSSL 1.1.1/3.0/3.1 or BoringSSL or QuicTLS OpenSSL
    : Nginx & PHP-FPM Benchmarks: Centmin Mod vs EasyEngine vs Webinoly vs VestaCP vs OneInStack

  8. #8
    Join Date
    Nov 2012
    Posts
    67
    Quote Originally Posted by Prometheus-X View Post
    Thank you all so much for the responses.





    So, the main concern isn't so much the hosting itself, but the database, because that will become the main bottleneck in the end, right?

    So, if I'm leasing a dedi server (which I am), can Casandra be installed in one of the cPanels and have the app be installed there?

    And... if Cassandra is so much better (and it's Open Source and free), how come it's not the default option? Does MySQL have any advantages over Cassandra?

    Also, what about the gradually growing needs in storage, RAM etc? Should I go with cloud hosting?



    I have not. I have several ideas. But I'd like to understand the technical stuff first, so I can see as much of the big picture as possible, upfront.

    Sorry for the many questions, btw!

    Thanks!
    These are rather loaded questions and can swing wildly depending on the type of app and how the DB is being used. Years ago I used to have clients that stored data in DB's that shouldn't be in it and that caused huge issues. There were even tutorials on how to do this back in the day for things like image galleries and even in the early 2000's I had DBs reaching 30 - 50gbs in size which was a big deal and issue. You can limit how much of a bottleneck a database might be by structing your data and requests properly.
    Scenario #1: If you have an app say that uses the DB only for log-ins and checking permissions for areas of the app the number of connections and more importantly the size of the request will be rather small. You should have no issue with even 100,000 users on a MySQL db on a single decent server.
    Scenario #2: You have a medical app that pulls large volumes of data every time a new page is loaded you'll very quickly run in to issues with the connection limit, open file limit (OS limit), and maybe even disk throughput on even a fraction of those number of users.
    Scaling Mysql or Other SQL based DB: There are two options, Vertical (Getting a better server) or Horizontal (Adding more servers) each has its own downsides and thats something I would research. My biggest note is dealing with Horizontal scaling in a SQL type DB can be complex you can read a bit about this issue that facebook dealt with in the mid 2000s and how they ended up using TAO to deal with auto setup of Sharded master-slave pairs. Its a very complex way of scaling rational DBs.
    Scaling NoSql Dbs: Same two options but its far better and almost always better to scale Horizontal, and because of the way the DB is designed its basically built for scaling. Read Here for a bit more info https://www.mongodb.com/nosql-explained/nosql-vs-sql

    Installing Cassandra is no easy task when using a control panel. But It will work with cPanel and while that is an option I would personally recommend just avoiding a control panel entirely as its un-needed overhead on the server, when dealing with scaling of any significant size all the services should be separated and redundant. Would really suck to have a single DNS server fail and bring down 15 other servers when a secondary 5$ vps could still hobble things along (not that I'm recommending that as a redundancy lol).

    As for why Cassandra isn't used more there is a few big reasons.
    #1 MySQL has been around for a while and besides the scaling issues is a very strong DB. Its rather rare in most cases for small to midsize users to reach any of the limitations of MySQL, and basically in the Shared webhosting world.
    #2 Cassandra is NOT a drop in replacement for MySQL though it can be done.

    Your final question is again hard to answer because it depends on alot of factors. EC2 for example has auto scaling groups but this can be very costly to setup at the start and does not save money in the long run. There is what I like to call unviable land for the large cloud service providers. At first its cheap enough to try things and run small setups, then as you start to scale to 10 - 15+ instances you would be far better off renting (or buying) your own dedicated servers and finally after a certain size and when you're ready to make a multi-year commitment (or you have HUGE demand spikes that only last a few hours through out a day/week) does it become more viable to run on EC2 again.


    If I was in your position I would do my development and testing on a few cloud instances or VPS's and then when ready to launch buy a couple of mid-range dedicated servers. At that point reassess your needs and cash flow to determine your best move forward.

    eva2000 made a few good points as well and Cassandra was just something that was mentioned by erick and myself because its one of the easiest DB's to run at scale. There are many different options out there and maybe none of the ones mentioned here are the 'right' option for you.
    Central Wisconsin MSP for 20 Years
    Customized Hosting Solutions
    DDOS Protected Services (Including GRE Tunnels)
    PM Me for details.

  9. #9
    Join Date
    Aug 2019
    Posts
    38
    Thank you all for the suggestions. I appreciate it!

Similar Threads

  1. Best Server HW to Start with in web hosting business
    By nathan_big in forum Running a Web Hosting Business
    Replies: 1
    Last Post: 07-10-2014, 02:03 AM
  2. Replies: 4
    Last Post: 11-17-2010, 04:19 AM
  3. New Host Looking for Support/Sales/Server Admins to Start!
    By Bodybags in forum Employment / Job Offers
    Replies: 5
    Last Post: 11-29-2003, 04:47 PM
  4. best server admins(well known and respected) here for hire?
    By UOIndustries in forum Dedicated Server
    Replies: 2
    Last Post: 05-08-2003, 07:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •