Want to understand the Basics of the Web, Cloud Computing and AWS? We have put together a quick article explaining the basics of each of the components of Web, Cloud Computing and AWS.
Basics of Web
For the most part, websites fall under two categories – static and dynamic. When the content displayed on a website is entirely hardcoded in the HTML, that’s called static. When the content is not hardcoded in HTML, but rather coming from a database, that’s called dynamic. Dynamic website content adjusts to reflect changes in data.
Static websites have front end code only. Dynamic websites have front end AND back end programming.
Back end programming requires pulling data from a database and binding it to the front end. Most often these programs or scripts reside on a server, which is why we call it server-side scripting. Languages used for back end programming include PHP, Java, C# and .NET.
A database is a collection of data that is organized so that the data can be easily accessed, managed and updated, as required. A Database Management System is a set of programs that help us access and manipulate data. A few examples of databases are MYSQL, SQL SERVER and ORACLE.
A server is a computer, device or program that serves or shares resources to other computers or programs, which are called clients.
How Websites Work
To make your static or dynamic website accessible on the Internet, it needs to be hosted on an Internet-connected server. This process of the server hosting your website is aptly called web hosting.
There are two ways Internet users can navigate to your website. One is to type the Internet Protocol (IP) address of the server that’s hosting your website into the browser navigation bar; however, this requires users to remember a long and seemingly arbitrary sequence of numbers. If you want to use a readable name instead, you’ll need to purchase a domain, like www.appitventures.com, and link that to your server IP address. Domain Name System (DNS) settings define this process of linking a domain name to an IP address.
Web Hosting in the Pre-Cloud Era
In the pre-cloud era, web hosting went like this: you’d purchase a physical server and deploy your website code on that, or you’d consult a web hosting service provider who would provide you with access to a virtual server on which to deploy your website code.
Traditionally, these virtual servers are of two types – dedicated and shared. Dedicated server hosting means that your website is the only site hosted on the server. Shared hosting means that your website is hosted on a server that has other websites on it as well. In either scenario, you’d need to choose your server configuration, like disk space and bandwidth (level of traffic, amount of data transferred to users), based on your requirements.
If the need for more disk space or bandwidth were to arise, you’d have to upgrade your plan manually. The major problem with this approach was that it would require you to choose your hosting plan based on your maximum possible near-future requirements rather than your usual requirements. For example, if your website has 10k visitors on the weekend, but has only a few hundred visitors on weekdays, you’d need to choose a plan that provides bandwidth capable of handling 10k visitors at any given time, leaving you paying for unused bandwidth throughout the week.
What is Cloud Computing?
You, the user, controlling computer power, database, storage, applications and other IT resources over the internet is called cloud computing. Cloud computing allows you to determine what you use, how you use it, when to scale up/down or add/remove resources per your traffic/load and so on.
Why Go Cloud?
Cloud enables you to automate the process of scaling up/down your servers and IT resources based on cost, time and traffic so that you only pay for what you use. Upgrading resources as needed is easy. Plus, you don’t have to manage servers or employ teams to monitor and secure them.
Companies using cloud.
What is Amazon Web Services (AWS)?
Though cloud enables you to control IT resources remotely via online platforms, all the data is stored in physical servers somewhere. Companies like Amazon, Google and Microsoft maintain server farms throughout the world and have built cloud services platforms to provide cloud computing to others as a subscription. AWS is Amazon’s secure cloud service platform.
Basic Products in AWS
AWS already offers hundreds of various services/products as part of their cloud services platform, and it’s growing rapidly year after year. By no means do you need to know or utilize all of them, but to get started with AWS there are a few essential services/products you should become familiar with.
Elastic Compute Cloud (EC2)
As mentioned before, if you have a website that you’d like to put out onto the Internet, you need a server to host the website code. EC2 provides virtual servers that you can configure by selecting one of the EC2 Instance Types.
Elastic Load Balancing (ELB)
Let’s say you have a website that you put on EC2. After some time, you begin to experience high daily traffic that can no longer be handled by a single EC2 instance of your chosen size. You either need to upgrade your EC2 (vertical scaling) or add another EC2 of same instance type (horizontal scaling). If you go on to purchase, say, four EC2s to meet the demands of the current traffic, how do these multiple EC2s work together to coordinate or distribute the load when users hit your website? Technically EC2s can’t do that, and it’s not their intended job. Instead, there is a service called ELB, which takes care of distributing the load/requests between EC2s. Your website URL (domain) should be configured to this ELB instead of a particular EC2 so that all the requests to your site are directed to ELB, which then distributes them to the EC2s internally.
Relational Database Service (RDS)
As stated earlier, for a website to be dynamic, a database is required. If you have a single server, you could feasibly install your choice of relational database management system, such as MySQL, right on the EC2 that hosts your back end/front end code; however, if you have multiple EC2s, you can no longer manage the database on one EC2 because the others need to access the database as well. In that case, the database will need to be stored outside of the EC2. As such, Amazon RDS is a service that facilitates the process of setting up, operating, and scaling a relational database of your choice. In addition to allowing your multiple EC2s to access the database, Amazon RDS also protects your database from any failures or issues within another related system, thanks to AWS Cloud’s decoupled architecture and backup services.
Simple Storage Service (S3)
If your website contains images, videos or other documents available for your users to view/edit/download, you need to store these files somewhere, right? You could store these on the EC2 where your front end/back end code is hosted, but as was the case with the database, things get complicated when more than one EC2s are involved. When you have multiple EC2s running, finding a particular file would take a lot of effort and the setup becomes messy.
For more reliable and accessible storage of an unlimited amount of data, AWS created S3. With S3, files are stored outside of the EC2, but are available to all EC2s or the general public with a URL. S3 is the most durable service from AWS, designed to deliver 99.999999999% durability.
Finally, let’s consider you have created an EC2 and you want to host your website on it. You could access your EC2 through CLI, SFTP or other protocols and copy your code onto it. With a single EC2, you could do this without issue; however, when you have multiple EC2s and want to push your latest changes live, you need to deploy the latest code onto all the servers manually, one by one. This process is tedious, time consuming and prone to human error. You might be seeing a pattern by now – things get tricky when you have multiple EC2s running.
To make things easy, AWS offers Elastic Beanstalk. Electric Beanstalk deploys your latest code to all of your servers at once, with minimum downtime and no issues for your users.
The above AWS services are the essentials – you can use one or all of them to get started. There are numerous other services/products from AWS available to help developers and companies leverage cloud computing and create amazing products. All in all, utilizing AWS allows you to spend more time solving business problems and less on the infrastructure required to run an online business.
About the Author
Meghanath Ganji is a certified AWS Solutions Architect Associate, with a decade of experience building mobile and web applications. He is VP Engineering at custom software development company, AppIt Ventures .