Posts

AWS: RDS - Relational Database Service

Relational Database Service also known as RDS is a collection of AWS services for managed relational databases. We call the database as managed because AWS takes care of: Scheduled automated backups Simple Software Backups Managed infrastructure for the database If your database is hosted on EC2 then you have to figure out about database backups, data redundancy, and software patches. But if your database is through RDS then AWS manages it all plus configuration is also easy. It also has ability to read replica. RDS database options: MySQL MySQL server PostgreSQL MariaDB Oracle DB Amazon Aurora RDS databases run on EC2 instances. Advantages of RDS databases: It makes easy to take snapshots. It makes it easy to change the hardware and EC2 configuration as it backups the database Type of DB Region EC2 instance type MySQL DB Oregon dB.m4.large Price: $0.35 USD per hr $8.40 per day Pricing changes based on the DB

AWS: S3 - Simple Storage Service

Amazon Simple Storage Service known as S3 is used to store files. The max files size that can be stored is 5TB. The files can be stored in a structure called buckets. A bucket is your root resource in which you add, delete or modify objects. There are all sorts of configuration options that you can set on buckets like permission, posting options and logging. Functions of an S3 bucket: It can trigger events when objects are added/modified or deleted. It can preserve older versions of objects. It can automatically replicate the object access regions. Once created, the S3 buckets are accessed via a URL. S3 bucket URL example: h ttps://s3-us-west-1.amazonaws.com/xyz.org/IMG/xyz_logo.jpg s3-us-west is the name of region, xyz.org is the bucket name, xyz_logo.jpg is the name of the file inside the bucket. Bucket can be used to hold the static files for the websites. S3 makes it simple to host a static website. But how can solve latency in S3?

AWS: Elastic Cloud Compute - EC2

Image
Elastic Cloud Compute known as the EC2 in short is one of the core service form AWS operating from multiple data centers around the world. What does EC2 do? EC2 is can be used to run applications, create virtual desktops, use 3rd party software with it and most importantly computing. What does " Elastic " mean basically? It means the instance which are running computing operations can increase or decrease at will. Basic unit of EC2 is an instance. What is an Instance? An instance is basically a virtual server which is an operating system agnostic.(bsically a virtual OS) EC2 uses AMI(Amazon Machine Image to create instances). AMI = OS + Software used on a EC2 instance Amazon only updates the image software, not your instance. Let us compare the configurations provided by AWS for large instances. Instance Types VCPU Memory(GB) Network General Purpose – t2.large 2 8 Low to Moderate Memory Optimized – r3.large 2 15 Moderate Compute Optimized – c4.large

What is AWS?

Image
AWS known as Amazon Web Services is the leading cloud service provided by Amazon. AWS is mainly used for developing applications that need to be scale quickly. Like the web application. AWS provides scalability and flexibility on which you can thrive on to develop apps. There are many services which are offered by AWS but here i will describe few of the main ones: Core Services provided by AWS are: Elastic Compute Cloud Simple Storage Service Relational Database Service Route 53 Extended Services of AWS: Elastic Beanstalk DynamoDB RedShift Virtual Private Cloud CloudWatch CloudFront

Building a REST API using Node, Express and MongoDB

Image
REST stands for Representational state transfer. A REST API defines a set of functions which developers can perform requests and receive responses via HTTP protocol such as GET, POST, DELETE, PUT, PATCH. A Real World Example: Facebook   provides a REST API which you can query to get the number likes, you can provide a search query like page name and it will return the results in JSON format. But here, we will see how can we build a REST API using Node JS and with the help of Mongo DB. 1. Sending a request to server and getting back data in JSON – A basic example below App.js var express = require ( 'express' ) ; var app = express ( ) ; //port number specification var port = process . env . port | | 3000 ; bookRouter = require ( './routes/bookRoutes' ) ( Book ) ; app . use ( '/api' , bookRouter ) ; //listening to a port app . listen ( port , function ( ) {   console . log ( 'Running on port' + port ) ; }