ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Small colo infrastructure for SaaS

    IT Discussion
    colocation saas
    8
    60
    3.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller @1337
      last edited by

      @pete-s said in Small colo infrastructure for SaaS:

      Also if you have a VM of the application running on both servers and load balance you would get a higher performance and scalable solution.

      Exactly. When things are healthy, you have two (or more) healthy nodes ready at all times, able to split the load. Replication is only the changes as they occur, so typically super tiny. And you can just scale and scale without too much extra effort. Depending on your scaling designs it can be as simple as adding another node to your overall setup.

      And you only need to backup from one node, ever, as they are all mirrors of the original.

      Now if you get really big and need to shard your data, then things get more complex. But in that case, this is the only design that really works.

      1 1 Reply Last reply Reply Quote 0
      • 1
        1337 @scottalanmiller
        last edited by 1337

        Alright, just to recap.

        We have two options here and we could use either option depending on the VM and the application itself.

        • Continuous VM replication (VM host to VM host replication?)
        • Database replication (VM guest to VM guest replication)

        And neither of them would require shared storage.

        Is that correct?

        And in the case of database replication we could also set up a load balancer and have the application running on multiple VMs (hosts) for higher performance and automatic failover.

        scottalanmillerS DustinB3403D 3 Replies Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller @1337
          last edited by

          @pete-s said in Small colo infrastructure for SaaS:

          Alright, just to recap.

          We have two options here and we could use either option depending on the VM and the application itself.

          • Continuous VM replication (VM host to VM host replication?)
          • Database replication (VM guest to VM guest replication)

          And neither of them would require shared storage.

          Is that correct?

          Correct. Shared storage never comes into the equation here.

          1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @1337
            last edited by

            @pete-s said in Small colo infrastructure for SaaS:

            And in the case of database replication we could also set up a load balancer and have the application running on multiple hosts for higher performance and automatic failover.

            Correct. Higher performance, faster failover. And you are hypervisor agnostic. So XenServer, KVM, LXD, doesn't matter, they don't even have to match.

            1 Reply Last reply Reply Quote 0
            • 1
              1337
              last edited by 1337

              Looking at the hardware for the VM hosts.

              VM host nodes will have 1 CPU, 10 cores, 64GB RAM, 500GB SSD storage. In my mind that would allow us to run 8 VMs per node with 4 vCPU, 8GB RAM and 50GB storage per VM. Every VM will be linux/bsd.
              Nodes are also easily expandable to 2 CPU, 20 cores, 128GB RAM and whatever storage that is needed (6x3.5" bays).

              Does the CPU / memory /storage balance seem right for these type of applications?

              Also would it be better to have VM setup with just the database or to have each type of application have their own DB inside their VM?

              So which one?

              • 4 VMs with different apps and one VM with the DB
              • 4 VMs with different apps and DB
              scottalanmillerS 1 Reply Last reply Reply Quote 0
              • DustinB3403D
                DustinB3403 @1337
                last edited by DustinB3403

                @pete-s said in Small colo infrastructure for SaaS:

                Alright, just to recap.

                We have two options here and we could use either option depending on the VM and the application itself.

                • Continuous VM replication (VM host to VM host replication?)
                • Database replication (VM guest to VM guest replication)

                And neither of them would require shared storage.

                Is that correct?

                That is correct. In either case, nothing is shared.

                With the guest replication though, nothing has to be changed. Just turn on the VM on Host B.

                With the DB replication, you have a lot of items that may need to be changed.

                1 1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @1337
                  last edited by

                  @pete-s said in Small colo infrastructure for SaaS:

                  Looking at the hardware for the VM hosts.

                  VM host nodes will have 1 CPU, 10 cores, 64GB RAM, 500GB SSD storage. In my mind that would allow us to run 8 VMs per node with 4 vCPU, 8GB RAM and 50GB storage per VM. Every VM will be linux/bsd.
                  Nodes are also easily expandable to 2 CPU, 20 cores, 128GB RAM and whatever storage that is needed (6x3.5" bays).

                  Does the CPU / memory /storage balance seem right for these type of applications?

                  Also would it be better to have VM setup with just the database or to have each type of application have their own DB inside their VM?

                  So which one?

                  • 4 VMs with different apps and one VM with the DB
                  • 4 VMs with different apps and DB

                  It's going to vary, but typically for this, if the DB is really the same across the board, I'd normally do a single DB VM that handles all of the databases. Then you only have one DB cluster to configure.

                  However, if the uptime and maintenance requirements of the databases are completely different, then maybe I would keep them separate.

                  What will cause you issues is trying to move to a new database version with schema changes if they are all merged and you can't coordinate maintenance time.

                  1 Reply Last reply Reply Quote 0
                  • 1
                    1337 @DustinB3403
                    last edited by 1337

                    @dustinb3403 said in Small colo infrastructure for SaaS:

                    I would recommend an approach like Host A - Master, Host B slave - NLS backup target

                    Host A performs continuous replications to Host B, as well as Host A backs up to the NLS host on a different schedule.

                    Should Host A go down, everything is on Host B with a quick startup and you're off to the races.

                    You'd still have your separate backups to recover from should something even worse occur.

                    I like this solution too but I don't like to have one host just in standby because we get better performance if half the VMs are on Host 1 and they can share CPU and storage resources there and the other half on Host 2.

                    For the VMs that need replication, we might just as well have replication going in both directions between the hosts, instead of just one direction. Don't you agree?

                    BTW, can you setup continuous replication without XO, just using xencenter or with xen itself?

                    dafyreD DustinB3403D 2 Replies Last reply Reply Quote 0
                    • 1
                      1337
                      last edited by 1337

                      This is how @scottalanmiller suggested HA in the database layer.
                      Webserver files themselves are static and the data in the database is what is changing.

                      0_1537834712194_colocation_network_loadbalancer.png

                      1 Reply Last reply Reply Quote 1
                      • black3dynamiteB
                        black3dynamite
                        last edited by

                        What are you using to create those diagrams?

                        1 1 Reply Last reply Reply Quote 0
                        • 1
                          1337 @DustinB3403
                          last edited by 1337

                          This is how @dustinb3403 suggested replicating VMs between hosts:

                          0_1537834749485_colocation_network_vmreplication.png

                          DustinB3403D 1 Reply Last reply Reply Quote 0
                          • 1
                            1337 @black3dynamite
                            last edited by

                            @black3dynamite said in Small colo infrastructure for SaaS:

                            What are you using to create those diagrams?

                            Microsoft Visio Pro.

                            1 Reply Last reply Reply Quote 1
                            • scottalanmillerS
                              scottalanmiller
                              last edited by

                              It does a nice job of making those look good.

                              1 Reply Last reply Reply Quote 1
                              • dafyreD
                                dafyre @1337
                                last edited by

                                @pete-s said in Small colo infrastructure for SaaS:

                                For the VMs that need replication, we might just as well have replication going in both directions between the hosts, instead of just one direction. Don't you agree?

                                If you don't want Host 2 sitting there waiting for something to fail... then I would have the 4 Production VMs on Host 1 Replicate to Host 2...

                                And the 4 Production VMs on Host 2 Replicate to Host 1... That would work, but I see the potential for confusion there.

                                1 Reply Last reply Reply Quote 1
                                • stacksofplatesS
                                  stacksofplates
                                  last edited by stacksofplates

                                  I'd also recommend using a tool like Consul for service discovery and health checking.

                                  Fabio (load balancer) natively works with Consul so as systems (LXC or VMs) are brought up they will be auto added to the pool. If they become unreachable they will be automatically removed.

                                  1 Reply Last reply Reply Quote 2
                                  • stacksofplatesS
                                    stacksofplates
                                    last edited by

                                    Here's a good talk from Kelsey on using Fabio, Consul, and Nomad.

                                    Youtube Video

                                    1 Reply Last reply Reply Quote 1
                                    • DustinB3403D
                                      DustinB3403 @1337
                                      last edited by DustinB3403

                                      @pete-s said in Small colo infrastructure for SaaS:

                                      BTW, can you setup continuous replication without XO, just using xencenter or with xen itself?

                                      While possible, it's not easily doable.

                                      For the VMs that need replication, we might just as well have replication going in both directions between the hosts, instead of just one direction. Don't you agree?

                                      I disagree here, the host performance in this case means you need your hosts to be able to cover the workload of your entire clientbase. So having slightly more powerful hosts here isn't an issue, and replication is easily be changed around.

                                      And the reason being is you'd be replicating VM's between two hosts and only having half of the workload protected from a failed host in this case anyways.

                                      The entire conversation revolves around protecting from a host failing. Which if you have the worst case scenario you have your backups to restore from.

                                      1 Reply Last reply Reply Quote 1
                                      • DustinB3403D
                                        DustinB3403 @1337
                                        last edited by

                                        @pete-s said in Small colo infrastructure for SaaS:

                                        This is how @dustinb3403 suggested replicating VMs between hosts:

                                        0_1537834749485_colocation_network_vmreplication.png

                                        While this is accurate, it also misses on the fact that he would still have his NLS server sitting, collecting backups on whatever schedule.

                                        Other than that it is accurate. In Scott's proposal you are making the shift from migrating the entire workload (which is essentially instant) to migrating the database only.

                                        In his case, the load balancer is the weak link in the chain. Granted these don't fail often but it isn't something you have control over either unless you provide your own for the COLO.

                                        scottalanmillerS K 2 Replies Last reply Reply Quote 0
                                        • scottalanmillerS
                                          scottalanmiller @DustinB3403
                                          last edited by

                                          @dustinb3403 said in Small colo infrastructure for SaaS:

                                          Other than that it is accurate. In Scott's proposal you are making the shift from migrating the entire workload (which is essentially instant) to migrating the database only.

                                          In mine he is replicating the database only, but not migrating it ever. The database would be in both places, at all times, always being used.

                                          1 Reply Last reply Reply Quote 0
                                          • K
                                            Kris_K @DustinB3403
                                            last edited by Kris_K

                                            @dustinb3403 said in Small colo infrastructure for SaaS:

                                            @pete-s said in Small colo infrastructure for SaaS:

                                            This is how @dustinb3403 suggested replicating VMs between hosts:

                                            0_1537834749485_colocation_network_vmreplication.png

                                            While this is accurate, it also misses on the fact that he would still have his NLS server sitting, collecting backups on whatever schedule.

                                            Other than that it is accurate. In Scott's proposal you are making the shift from migrating the entire workload (which is essentially instant) to migrating the database only.

                                            In his case, the load balancer is the weak link in the chain. Granted these don't fail often but it isn't something you have control over either unless you provide your own for the COLO.

                                            2 haproxy VMs (one per host) and keepalived for failover

                                            1 Reply Last reply Reply Quote 2
                                            • 1
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • First post
                                              Last post