Chat Application Using Js
Chat Application Using Js
Purpose:
It allows users to focus on coding and development rather than server
management, storage, or networking.
Examples:
Google App Engine
Microsoft Azure App Services
Heroku
what is Infrastructure-as-a-Service?
* Supercomputers
* Cloud servers
* High-performance computing tasks
4. **Advantages**:
1. Scalability Issues
- **Monolith Problem:** Scaling a monolithic app requires replicating the
entire application, even if only one module faces high demand.
- **Microservices Solution:** Individual services can be scaled
independently based on demand (e.g., scaling only the payment service during
peak shopping hours).
2. Slow Development&Deployment
- **Monolith Problem:** Large codebases lead to slower builds, testing, and
deployments. A single change requires redeploying the entire app.
- **Microservices Solution:** Smaller, decoupled services allow teams to
develop, test, and deploy independently (CI/CD pipelines per service).
3. Technology Lock-in
- **Monolith Problem:** A monolithic app is usually built with a single tech
stack, making it hard to adopt new technologies.
- **Microservices Solution:** Each service can use a different
language/framework (e.g., Python for ML, Node.js for APIs, Java for backend).
4. Fault Isolation&Resilience
- **Monolith Problem:** A single bug or failure can crash the entire
application.
- **Microservices Solution:** Failures are isolated (e.g., if the user service
crashes, the product service remains operational). Circuit breakers and retries
improve resilience.
6. Performance&Efficiency
- **Monolith Problem:** A bloated codebase leads to slow startup times and
inefficient resource usage.
- **Microservices Solution:** Lightweight services start faster and optimize
resource allocation (e.g., memory-heavy services can run on dedicated
instances).
7. Database Scalability&Flexibility
- **Monolith Problem:** A single database becomes a bottleneck and forces
a one-size-fits-all schema.
- **Microservices Solution:** Each service has its own database (Polyglot
Persistence), allowing SQL for transactions and NoSQL for analytics.
8. Long-Term Maintainability
- **Monolith Problem:** Over time, monoliths become harder to refactor due
to tight coupling.
- **Microservices Solution:** Loose coupling allows incremental updates
without full rewrites.
3.
a) How Can Attackers Attack the Hypervisors?
1. **VM Escape**:
2. **Hypervisor Exploits**:
4. **Unauthorized VM Access**:
5. **Inter-VM Attacks**:
7. **Malicious VM Injection**:
Monitoring&Alerts: Use tools to monitor CPU, memory, and disk usage; set
alerts to act early.
Resource Quotas: Set limits for users or applications to prevent excessive
resource usage.
4.
a) What is threat agent? Explain map reduce algorithm in cloud.
Components:
Map Function: Processes input data and produces intermediate key-value pairs.
Reduce Function: Aggregates or summarizes data with the same key from the
Map phase.
Example (Word Count):
Advantages in Cloud:
Key Features:
Purpose:
Helps organizations analyze risks and select cloud solutions based on their
security needs and business goals.
5.
a) Explain service level agreement (SLA) With it's types.
Components:
Example: A company signing one SLA covering email, storage, and hosting
services.
2. Service-Based SLA
Definition: A standard SLA for a particular service, applied to all customers
using that service.
Example: A cloud storage service offering the same 99.9% uptime SLA to all
users.
3. Multi-Level SLA
Definition: Combines elements of both customer-based and service-based
SLAs.
Levels:
Benefits of SLA:
Builds trust and transparency
b)
6.
a) What is containerization? A company wants to lunch a ride sharing
application. As a software developer create the service oriented architecture for
the ride sharing applications.
Containerization is a lightweight virtualization method where applications are
packaged along with their dependencies, libraries, and runtime into a single unit
called a container.
1. **User Service**
2. **Driver Service**
4. **Booking Service**
5. **Payment Service**
6. **Notification Service**
7. **Ratings&Review Service**
* Collects ride data, user behavior for business insights and reporting
7.
a) Public Cloud
1. **Definition**:
A **public cloud** is a cloud computing model where services such as
servers, storage, and applications are delivered over the internet by **third-party
providers**.
2. **Examples**:
3. **Key Features**:
* **Shared Infrastructure**: Resources are shared among multiple users
(multi-tenant environment).
* **Scalable**: Easily scale up or down based on demand.
* **Pay-as-you-go**: Users pay only for the resources they use.
* **Accessible Anywhere**: Services can be accessed via the internet from
any location.
4. **Advantages**:
5. **Disadvantages**:
Identity and Access Management (IAM) refers to the policies, processes, and
technologies that ensure the right individuals (users, devices, applications)
have the appropriate access to systems and data within an organization. IAM
helps enforce security protocols and complies with regulations.
c) Kubernetes
• Pods: A group of one or more containers that are deployed together on the
same host machine.
• Replication Controllers: Ensures the desired number of pods are running.
• Services: Provides a stable IP address and DNS name for accessing pods.
• Scaling: Allows automatic scaling of applications based on demand.
• Self-Healing: Automatically restarts containers if they fail and
reschedules them on healthy nodes.
• Resource Management: Efficiently manages resources like CPU and memory.
Advantages of Kubernetes:
• Scalability: Handles large-scale containerized workloads effectively.
• Portability: Supports multi-cloud and hybrid cloud deployments.
• Automated Deployment & Updates: Simplifies application deployment,
scaling, and updates.
• High Availability: Ensures high availability of applications by distributing
containers across nodes.
Set 2
1
a) Why is cloud computing considered an evolution rather than
as an innovation? What are the advantages of grid computing?
2
a) Why is service Oriented Architecture considered as the emergence
of flexible application architecture? [8]
Reliability Risks – A failure in one part of the system could bring down the
entire platform.
functionalities:
Notification Service – Sends emails and SMS notifications for orders and
offers.
Databases: MySQL for orders & users, MongoDB for product catalog, Redis for
caching
Service Monitoring: Prometheus & Grafana for real-time insights and alerts
techniques, including:
Denial of Service (DoS) Attacks – Overloading the hypervisor with requests can
cause service failures and downtime.
Mitigation Strategies:
5
a) manually preparing or extending IT resources in response to workload
fluctuation is time-intensive and unacceptably efficient. How can IT resources
be scaled automatically in response to fluctuating demand?
Example: A cloud database increases RAM when queries spike and reduces it
during low traffic.
Example: An e-commerce website adds more web servers during sales events
and removes them afterward.
Load Balancing
Threshold-Based Scaling
Example: AWS Auto Scaling adds servers when CPU usage exceeds 80%.
Scheduled Scaling
Event-Driven Scaling
Resources scale dynamically based on real-time triggers (e.g., user logins, order
placements).
Example: A ride-sharing app scales up its backend when demand spikes during
peak hours.
6
a) Explain the key features and advantages of the Hadoop Distributed File
System (HDFS) in the context of big data processing.
● Distributed Storage – Large files are split into blocks (default: 128MB or
infrastructure costs.
● Seamless Integration with Big Data Tools – Works well with MapReduce,
b) The given document are divided into three blocks of HDFS. Design a
Hadoop's map reduce framework to count the frequency of the world in the
total document.
• D1: "the quick brown fox jumps over the lazy dog. a red apple hangs from the
tree."
• D2: "mountains cast long shadows during sunset. the tree provides shade for
the red apple."
• D3: "the sunsets behind the mountains. the lazy dog barks at the quick brown
fox."
## 🗺 1. **Map Phase**
Each mapper processes one block/document and emits `<word, 1>` pairs.
```
<the, 1>
<quick, 1>
<brown, 1>
<fox, 1>
<jumps, 1>
<over, 1>
<the, 1>
<lazy, 1>
<dog, 1>
<a, 1>
<red, 1>
<apple, 1>
<hangs, 1>
<from, 1>
<the, 1>
<tree, 1>
```
```
<mountains, 1>
<cast, 1>
<long, 1>
<shadows, 1>
<during, 1>
<sunset, 1>
<the, 1>
<tree, 1>
<provides, 1>
<shade, 1>
<for, 1>
<the, 1>
<red, 1>
<apple, 1>
```
```
<the, 1>
<sunsets, 1>
<behind, 1>
<the, 1>
<mountains, 1>
<the, 1>
<lazy, 1>
<dog, 1>
<barks, 1>
<at, 1>
<the, 1>
<quick, 1>
<brown, 1>
<fox, 1>
All intermediate key-value pairs are grouped by **key (word)** and sent to
reducers:
Example:
```
<the, [1, 1, 1, 1, 1, 1, 1]>
<quick, [1, 1]>
<brown, [1, 1]>
<fox, [1, 1]>
<lazy, [1, 1]>
<dog, [1, 1]>
<red, [1, 1]>
<apple, [1, 1]>
<tree, [1, 1]>
<mountains, [1, 1]>
## 🧮 3. **Reduce Phase**
| Word | Frequency |
| --------- | --------- |
| the |7 |
| quick |2 |
| brown |2 |
| fox |2 |
| jumps |1 |
| over |1 |
| lazy |2 |
| dog |2 |
|a |1 |
| red |2 |
| apple |2 |
| hangs |1 |
| from |1 |
| tree |2 |
| mountains | 2 |
| cast |1 |
| long |1 |
| shadows |1 |
| during |1 |
| sunset |1 |
| provides |1 |
| shade |1 |
| for |1 |
| sunsets |1 |
| behind |1 |
| barks |1 |
| at |1 |