5 RDS1
5 RDS1
base as a service
1. DB installation
2. DB backup
3. DB storage management
4. HA of DB as DB is accessed from multiple applications
Lets take ur bank acct u will access via netbanking, atm, mobile app etc
If one app not working u can access via other method but if DB server
is failed all front apps are of no use
so DB HA is very very important
Interview how u are achieving HA in DB, never say via ASG and ELB,
because those are only for application HA
How to achieve DB HA, aws given one option called Multi AZ which is
completely aws feature
say I created
DB in singapore(AZ1,AZ2,AZ3,AZ4)
Primary DB server(AZ1)
Both servers will have same data, aws will take care of replication
mysql.connector.connect(host=""hostname or ip address
database = databasename
user = root
password=
say if primary Ip/host I give and it goes down then traffic redirected
to secondary then who is going to update
my code to secondary Ip/host
Like whenever u create ELB it gives DNS name in same way when u create
RDS it gives DNS name
dont use this as dns name, use word called DB endpoint--> endpoint
means dns name
DB endpoint
---->test1db.ap-south-1.aws.amazon.common
this domain name pointing to primary db ip address, so in all
applications code use dns name
if primary goes down then it will switch ip address of dns name i.e db
end point ip address will be changed automatically
======================================================================
1. Retention period
2. RTO
3. RPO
lets take for ur application u are taking backup every 1hr, who is
going to take decision on this, its a business call
business req, as a technical person
DB1--->
1st backup ---> 10:00 AM --> B1
2nd ----------> 10:15 AM --> B2
3rd ----> 10:30 AM ---> B3
RTO means upto 10:30 database data need to be available and working
condition
say 10:40 DB crashed, through backup u need to bring back system into
running condition, so how much time it takes to recover
i.e RTO
How far back recovery point and how much time it takes to recover is
RTO
Technical keywords:
1. MultiAZ
2. End-Point
3. Retention Period
4. Subnet group means group of subnets , will xplain in last
5. Read Replica
6. RTO
7. RPO
Both are replicas only, multiaz means syncronous replica means other
server will created i.e secondary
Multi az - at a time connect to one DB
DB1 --> amount debited means some amt will be deducted means update,
insert happening on database server, millions of read and write
operations
happening. so DB1 shlould be in good performance
For ex: I waant ATM wide transactions, here you are doing intense read
operations on server, not writing anything
which ATM is very bisy, which ATM is less busy
======================================================================
Subnet Groups:
VPC
-->
SN1---> AZ1
SN2---> AZ2
SN3---> AZ3
SN4---> AZ4
I created a group
we dont have access to login to AWS RDS OS, they only give database
connectivity
Business req: There are lot of ways u get data into database for
our intelliq it,
phone, email, sms
SNO
SNAME
MobileNo
Course
Date of enquiry
Preferrable Time
email id
source of enquiry
I need to upload joined student details, as JSTUD table
SNO
SNAME
Course
DOJ
Fees
DOP
Batch Timings
create table
ALTER TABLE
DROP TABLE --> ENTIRELY U ARE DELETING STRUCTURE
TRUNCATE --> DELETE ALL DATA OR COLUMNS
HOW TO READ DATA FROM DATABASE, HOW MANY STUDENTS JOINED FROM LAST
1MONTH
===============================================================