-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathsession-49.txt
More file actions
147 lines (116 loc) · 3 KB
/
Copy pathsession-49.txt
File metadata and controls
147 lines (116 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
Family History
100 years back
joint familities
5 couples
20 children
25-30 members
individual big houses
advantages
==========
no shared, we have freedom
privacy
everything in our control, we can design
disadvantages
==========
too much cost
maintainance on us
time taking process
1 couple
2 or 3 kids
a flat is enough
advantages
==========
low maintainance
less cost
just pay and joint
less time
disadvantages
==========
less privacy
space is shared
we dont have control
more rules
individuals
==========
single person
shared room/pg
advantages
==========
less time
no maintainance at all
no responsibility
too less cost
disadvantages
=========
no privacy
everything is shared
0 control
Legacy = Frontend + Backend
JSP+Servlets+HTML
150Mb
disadvantages
=============
a small problem in frontend/backend crash everything
a small change should create new version.. new application release
size is very big
physical baremetal servers
monolitic
============
frontend -> API -> backend(catalogue+user+cart+ratings etc.)
angular js
advantages
==========
problem in frontend can't create problems in backend..both are different
release process is different
size is 50% reduced
speed of provisioning(boot time) is reduced
Virtulisation -> 100GB RAM, 2TB HD, 16 cores, host OS(vmware esxi)
VM -> 1GB RAM, 8GB HD, 1 processor, Guest OS(windows)
VM -> 2GB RAM, 20GB HD, 2 processor, Guest OS(Linux)
disadvantages
==========
all components must use same programming language
single component problem can crash entire backend
MicroServices
==========
frontend -> user, cart, catalogue, ratings, etc..
advantages
==========
multiple programming languages
release process is different
problem in a single component still keeps the application running
less downtime
connected through API
URL, Method, Sample request, expected response, status code
containerisation
===============
1. no resource allocation, can use dynamically
2. less cost
3. less boot time
4. less size
5. portable and immutable
6. scalable and reliable
7. less privacy, but we can address this
Docker
======
AMI = OS + System packages + App run time + App code + App dependencies -> Instance/Server/VM -> AMI ID
Docker Image = Bare minimum OS + System packages + App run time + App code + App dependencies -> Container
OS + System packages
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -aG docker ec2-user
logout and login again
docker commands
===============
docker ps -> running containers
docker images -> images available
docker pull nginx -> pull the image from dockerhub
docker create nginx -> creates the containers, status is created
docker start container-id -> start the container
docker rm container-id
docker rmi nginx
docker run nginx = pull + create + start
nginx = OS + system packages + nginx software