Professional Documents
Culture Documents
Introduction
BetterDev is a Norwegian based, global educational company. It provides a
learning management system that allows students all around the world to find
useful tidbits provided by other developers and get up to speed on the newest
technologies.
BetterDev excels by professionally managing and translating each course
uploaded to their servers, assuring top quality videos and learning material.
With the increased demand on BetterDev’s services, we have been assigned to
renovate their whole server infrastructure, and assure the new servers can
accommodate for up to one hundred thousand users.
This paper analyses the workflow in determining the best options to implement a
robust, scalable, high performing virtual environment. It will also highlight the
implications virtualization can have on server performance, and why different
hosting providers like Google Cloud can prove to be the right choice for our client.
Further, in this paper, we will discuss the options we had available as well to
demonstrate and reflect upon our choices in practical application. We will also
create a minimum viable product, which is a low scale fully functional
demonstration of the end product. MVP will help us explore new ideas as well as
provide a sample of the end product to satisfy our client.
To achieve this, it is crucial to do extensive research and understand the
fundamentals of virtualization and why it differs from other methods. Once
enough information has been gathered around this topic, we will explore
different approaches, and explain why we ended with choosing virtual servers
over local. As well as discuss why operating systems like Linux suited our needs
much better than the known Windows OS.
Main Part
What is Virtualization?
Virtualization on a computer is virtually the same as virtual reality for humans.
Virtual reality creates an environment convincing enough for a human to work
within it. Virtualization does the same by convincing a guest OS it is running on its
own hardware by using a hypervisor (Meyers, 2016).
Hypervisor enables hardware and software to work together in order to enable
one machine (Host) to run multiple guest OS. Figure A represents a hypervisor on
a single system hosting three virtual machines (Meyers, 2016).
Cloud Virtualization
Let’s assume we only have one physical server. If we use it to host an important
site, the full potential of the server might go unused. But if we install a hypervisor
on it, we are now using our server more productively (Meyers, 2016).
With hypervisors, we can use a virtual machine to host our website, only allocate
fractions needed from the host’s physical hardware, and accordingly add more
resources if needed (Meyers, 2016).
While such simple virtualization has enabled us to optimize and reallocate our
computing resources in response to our needs, we can’t, unfortunately, exceed
the capability of the local hardware (Meyers, 2016).
Fortunately enough, large companies like Google and Microsoft, offer computing
services (servers, storage, networking, etc…) over the internet, also known as “the
cloud” (Azure.microsoft.com, 2018).
Google Cloud Platform
As the name suggests, Google Cloud Platform or GCP delivers different computer
solutions through a huge network of virtual servers. Google is a global
Infrastructure as a Service (IaaS) provider; it uses virtualization to minimize idle
hardware, protect data, and eliminate downtime and respond to spikes in
demand (Rouse, 2013).
By using IaaS, Google manages the provided resources like data storage,
virtualization, servers, and networking, and leaves us responsible for handling
other resources including applications, runtime, etc. (Rouse, 2013).
GCP uses Kernel-based Virtual Machine (KVM), a Type-1 hypervisor. It is a run
directly in the kernel and ensures overall better security and performance (Honig,
2017). Hardware Virtualization allows scalability and flexibility whenever extra
resources are needed.
There is a range of machine types, from one CPU up to 64 CPUs, and from half a
gig of RAM up to 416 GB, meaning we can choose and configure machines
depending on our needs. Google also offers Virtual CPUs, which are a lot cheaper
than dedicated CPUs but are shared with other clients (Google Cloud. 2018).
For every machine we start up, we are going to need attached storage, and so
GCP offers standard and SSD persistent disk. Disk options, whether they’re SSD or
persistent offer very high availability and durability. The data is actually spread
across multiple disks, so if a particular device goes down, the data doesn’t get
lost, and the users continue to have access. The data is also automatically
encrypted (Google Cloud. 2018).
There are a lot of customer-friendly pricing innovations offered by Google.
Instances are billed on a per minute basis, and for the duration, it is running
(Google Cloud. 2018).
Local Servers vs. Cloud Servers
We chose IaaS over On-Premises services because it allows us to rent IT-
infrastructure and upgrade as needed. This cuts down on the expenses of setting
up the on-site Datacenter (Electricity, Server Racks, cooling, etc.), as well the
expenses of hiring IT experts to manage and administer the infrastructure (Sether,
2016).
Hosting Providers allows easy global scalability, especially when our client has
users from all around the world. If we were to have on-site Datacenter, people
living far away would have bad latency, thus poor user experience. Cloud servers
offer datacenters all around the world, meaning with few clicks, we can launch
new servers depending on the users’ geographic needs (Sether, 2016).
Since our client provides educational videos, it is important to excel in
performance and speed. Cloud computing provides fast, efficient, and regularly
upgraded computing hardware, ready to be used. In addition to the unlimited
flexible storage amount, that can save a lot of physical space in an office, if we
were to have an on-site datacenter (Sether, 2016).
While Cloud services might sound like a match made in heaven for us IT nerds,
however, it is important to realize that we, by choosing Cloud Providers, are
entrusting the foundation of the business to them. But it is a risk that we have
chosen to take, especially when it comes to a reputable provider like Google
(APOSTU and PUICAN, 2015).
We wait for the VM instance to get setup and booted, and then SSH into our VM
as shown in Figure-C.
Once we are inside the system, we can make sure the system is up to date by
running sudo apt-get update && sudo apt-get upgrade which updates and
installs newest versions of different packages on the OS.
Now we want to install Apache, MySQL, and PHP. Luckily, Moodle has provided us
with a step by step tutorial on how to do it, but in summary:
1. Install Apache, MySQL, PHP5
sudo apt-get install apache2 mysql-client mysql-server php5
2. Download Moodle
sudo git clone git://git.moodle.org/moodle.git
After running installing and downloading Moodle, we copy the local repository
(where Moodle was downloaded) to /var/www/html (where the website will be
hosted). We follow along with the tutorial, and at the end of it, we can connect to
Moodle through http://ip.address.of.server/moodle . NB! Check out the
installation guide for more details at https://docs.moodle.org/26/en/Step-by-
step_Installation_Guide_for_Ubuntu (See Figure-D).
Figure-D
Users
After installing Moodle, creating users is just a few clicks away. With Admin
privileges we can create users as following Users > Accounts > Add a new user
(Docs.moodle.org, 2018).
We then get a page to insert the personal information about our users; it looks
like this:
After creating ten users, we can browse through the list of users through Users>
Accounts > Browse list of users (Docs.moodle.org, 2018).
We can see here that we have created up to 14 users.
Scalability
Now that we have demonstrated how easy it is to set up an LMS in seconds, it is
important to note that all that happened on one server, where the database, web
server is hosted on the same machine. This is not an effective solution especially
when we are talking about a global user base.
To be able to accommodate 100K users, we build the following architecture
represented in Figure-E.
Figure-E: Edited from Google Cloud Platform
Using the architecture represented above, we can see that we have users coming
from North America, Europe, and Asia. They all hit the same IP address, and this
IP address is actually an intelligent load balancer. It will direct users to the closest
set of servers that have the capacity (Google Cloud, 2018).
In the example above, we have servers in US Central, Northern Europe and in Asia
East. We are running Apache servers, and these servers deliver the standard user
interface to the LMS users. If load goes up, we want to this to scale up and give us
multiple servers automatically (Google Cloud, 2018).
These Apache servers are pulling all of the configuration data, user information,
information about the learning paths, and learning modules out of a Cloud SQL
instance (Google Cloud, 2018).
When a developer creates a new module, he uploads media, and that media goes
into Google Cloud Storage, and we transcode that media by taking the original file
video and encoding it at 480p, 720p, and 1080p (Google Cloud, 2018).
Transcoding servers are back-end servers separate from the front end; they will
open up the submitted media, transcode it into different versions, and store it in
different locations. This allows users to choose the preferred video resolution
depending on their bandwidth (Google Cloud, 2018).
Google Compute engine can create new VM instances that look just like the
original development machines, and automatically scale up or down the number
of instances depending on the load (Google Cloud, 2018).
Google makes this whole process easier through Instance templates. Instance
templates define a virtual machine’s type, boot disk image, network, and other
properties when it is created. Using this automatic process, we can then create
instance groups (Google Cloud, 2018).
References:
Meyers, M. (2016). CompTIA A+ certification all-in-one exam guide (exams 220-901 & 220-902). 9th ed.
Azure.microsoft.com. (2018). What is cloud computing? A beginner’s guide | Microsoft Azure. [online]
Available at: https://azure.microsoft.com/en-in/overview/what-is-cloud-computing/ [Accessed 11 Nov.
2018].
Rouse, M. (2013). What is Infrastructure as a Service (IaaS)? - Definition from WhatIs.com. [online]
SearchCloudComputing. Available at:
https://searchcloudcomputing.techtarget.com/definition/Infrastructure-as-a-Service-IaaS [Accessed 11
Nov. 2018].
Honig, A. (2017). Seven ways we harden our KVM hypervisor at Google Cloud: security in plaintext |
Google Cloud Blog. [online] Google Cloud Blog. Available at:
https://cloud.google.com/blog/products/gcp/7-ways-we-harden-our-kvm-hypervisor-at-google-cloud-
security-in-plaintext [Accessed 11 Nov. 2018].
APOSTU, A. and PUICAN, F. (2015). Study on advantages and disadvantages of Cloud Computing.
[online] Pdfs.semanticscholar.org. Available at:
https://pdfs.semanticscholar.org/da62/49af5e0df8ed36334b34c2f1010ed19c53f4.pdf [Accessed 11 Nov.
2018].
Moodle. (2018). Pricing - Moodle. [online] Available at: https://moodle.com/pricing/ [Accessed 11 Nov.
2018].
Capterra.com. (2018). Moodle Reviews and Pricing - 2018. [online] Available at:
https://www.capterra.com/p/80691/Moodle/#reviews [Accessed 11 Nov. 2018].
Google Cloud. (2018). Quickstart Using a Linux VM | Compute Engine Documentation | Google Cloud.
[online] Available at: https://cloud.google.com/compute/docs/quickstart-linux [Accessed 11 Nov. 2018].
Docs.moodle.org. (2018). Browse list of users - MoodleDocs. [online] Available at:
https://docs.moodle.org/35/en/Browse_list_of_users [Accessed 11 Nov. 2018].
Linux Academy Blog. (2018). What is scalability in cloud computing? - Linux Academy Blog. [online]
Available at: https://linuxacademy.com/blog/cloud/scalability-cloud-computing/ [Accessed 11 Nov. 2018].
Google Cloud. (2018). Autoscaling Groups of Instances | Compute Engine Documentation | Google
Cloud. [online] Available at: https://cloud.google.com/compute/docs/autoscaler/ [Accessed 11 Nov. 2018].
Google Cloud. (2018). Google Cloud Platform | Documentation | Google Cloud. [online] Available at:
https://cloud.google.com/docs/ [Accessed 11 Nov. 2018].
S.P.T, K. (2015). Getting Started with Google Cloud Platform. [online] ResearchGate. Available at:
https://www.researchgate.net/publication/300149417_Getting_Started_with_Google_Cloud_Platform
[Accessed 11 Nov. 2018].
Salmeron, A. (2018). Building and Developing Science Gateways with Google Cloud Platform. [online]
Sciencegateways.org. Available at:
https://sciencegateways.org/documents/20182/25103/Google+Cloud+Platform+SGCI+Webinar+Slides.pd
f/8d27354e-28f0-4fe8-8bbd-88bd916df8e4 [Accessed 11 Nov. 2018].