This forum provides solutions for aws developers for their issues.It provides solutions for aws elastic ip, ec2 instance, public ip,route53 pricing, load balancers in aws,Orchestration, ebs,, lambda, installing mongodb on ubuntu etc.

Sunday 6 August 2017

Elastic Load Balancing

Elastic Load Balancing automatically distributes the incoming application traffic across multiple was ec2 instances.

Two types of load balancers :
Application Load Balancer
Classic Load Balancer

Elastic Load Balancing :
It is in-region load balancing service and distributed traffic  across multiple availability zones -HTTP/S, TCP/S.
Fully fault tolerant
Buit in health check













Application Load Balancer Features:
• It has Containerized Application Support
• It has Content-Based Routing
• It support for  HTTP/2
• Contains Delete Protection
• Supports WebSockets
• Supports Layer-7 Load Balancing
• Supports Web Application Firewall (WAF)
• Contains Request Tracing

Classic Load Balancer Features:
• Contains Health Checks
• It has High Availability
• Supports Security Features
• Supports Sticky Sessions
• Supports SSL Offloading
• Support for Layer 4 or 7 Load Balancing
• It has Operational Monitoring
• provides Logging
• provides IPv6 Support

Saturday 5 August 2017

Creating Database MongoDB


MongoDB is document based database.
Creating Database NodeJS - MongoDB

Once mongoDB is up and running,

var mongoDB =  require('mongodb');


var mydbserver =  new mongodb.server('localhost', 27017, {auto_reconnect:true});

/* new mongodb.Db() creates a new database */
/* w:1 sets the write concern */

var database =  new mongodb.Db('eCommerceDb',mydbserver, {w:1});



Collections :

Relational databases uses tables to store data. MongoDB stores data as document format uses collection. It is NoSql type database.

Collections are represented as JSON format.

Tuesday 1 August 2017

Installing MongoDB


Mac Installation :

The easy way to install MongoDB is by using package manager like Homebrew  or MacPorts.
$ sudo brew install mongodb
or 
sudo port install mongodb
Setup the data directory
sudo mkdir -p /data/db
setup appropriate permissions
$ sudo chown 'id -u' /data/db
Ubuntu Installation :
To authenticate apt-get package, install the public GPG key from MongoDB creators.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

create a file /etc/apt/sources.list.d/10gen.list  and  add the below text

deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
Install latest stable build of MongoDB
$ sudo apt-get update
$ sudo apt-get install mongodb-10gen
Windows Installation :
Download the latest stable build from https://www.mongodb.com/download-center#community
Make sure appropriate version 64 bit or 32 bit
Install with the installation file.
create the data directory 
mkdir data
mkdir data\db
Running MongoDB
On Mac :


mongod
On Ubuntu :
$ sudo service mongodb start
On Windows :
c:\mongodb\bin\mongod.exe












Monday 31 July 2017

Features of MongoDB

One of the  main reasons  to use NOSQL database is built in sharing capabilities.
Sharing allows to distribute single database across cluster of machines.

It means, distribute the load rather than purchasing the large server. 
Sharing also help in server handling big data. The data stored in database is increasing exponentially. 
Some databases are very large for each server. So distribution across cluster is necessary. 


No sql databases are lot easier to maintain with the administration tools.

It also supports aggregation (Batch data processing ) and aggregate calculations using the native operations.
It is a schema less database.
It supports map reduce (Large volume of data into useful aggregated data.)
It also supports geospatial and secondary indexes on the collections.

Indexes are efficient execution of queries.Create a simple and complex indexes which will be used for speeding up the query execution.

Friday 28 July 2017

What is Amazon ElasticCache ?

Many applications getting popular which is great, but when it comes to performance under heavy load, it is very bad. At the peak times, users are just giving up.
How we can solve this issue without re-engineering the application?

Amazon ElasticCache will solve the problem. It improves the performance of web applications by allowing the retrive the information fast, in-memory caches instead of relying on slow disk based databases.
It automates the time consuming tasks such as infrastructure provisioning, managing persistance,installing the software and patch management etc.

Amazon ElasticCache are managed in-memory service. You can define a cluster of nodes. You have the option for redis as well.
AWS will take care of the cluster management, in-memory cache etc.

Install Nodejs on Ubuntu 16.04

Node.js is a platform built on chrome's Javascript runtime for easily bulding fast and scalabale apps.
It uses an event driven, non blocking I/O model that makes it light weight and efficient for data intensive apps that run across distributed devices.

first update api package
$sudo apt-get update
Using apt package manager,   then   $sudo apt-get install nodejs
Install npm package 
$sudo apt-get install npm 

Sunday 23 July 2017

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

sudo dockerd \
      --storage-opt dm.datadev=/dev/sda1 \
      --storage-opt dm.metadatadev=/dev/sdf

INFO[0000] libcontainerd: previous instance of containerd still alive (1271)
INFO[0000] [graphdriver] using prior storage driver: aufs
Error starting daemon: error while opening volume store metadata database: timeout



$ systemctl daemon-reload
$ sudo service docker restart
$ sudo service docker status (should see active (running))
$ sudo docker run hello-world

Labels

Online Training

Your Name :
Your Email: (required)
Your Message: (required)

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts