Technical Interview 4 Flashcards

1
Q

**Scenario where latency is an issue for a web server and what things you would consider? (Expect a bunch of follow-up questions based on your answers)

A

** TRIAGE **

I would first try to see exactly what the client is describing as slow - I need to know what they are seeing and exactly what they are experiencing.

I’d want to know if this is intermittently occurring or can be recreated every time.

After seeing the type of slowness, the speed in which the web page responds, which web pages appear to respond slowly - i’d develop a strategy to narrow down the moving parts for that piece.

Is the webserver hosting content static or dynamic content that could utilize CDN/CloudFront - Edge Locations?

Are we seeing delay/latency on the user side because they are not being routed to the nearest region that we are hosting? We could setup latency based routing from route 53 to start with to ensure users are decreasing latency there.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

***How can you increase the performance of the database?

A

At the software level: Optimize queries, improve indexes

Relational DB: (vertically) Increase Database instance type/size - Increase memory, cpu, and storage (if you’re wanting to increase the number of IOPS) - or switch storage type from general purpose to provisioned iops. (Horizontally) Possibly sharding

NoSQL: By scaling horizontally to allow more instances of the database and/or vertically to add more resources to the individual machines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What do you understand by hardening and how you do it?

A

Hardening is usually the process of securing a system by reducing its surface of vulnerability, which is larger when a system performs more functions; in principle a single-function system is more secure than a multipurpose one. Reducing available ways of attack to take place on it.

For an operating system it may be:

  • ensure unnecessary services are disabled/removed
  • closing unneeded network ports
  • setting up firewalls or intrusion detection

Code hardening consists of preventing security holes in the code of an application so that even if the application could be reversed, no flaws could be exploited

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How will secure your three tier application (5)?

A

Protection from attacks:- AWS Shield - AWS WAF

Encryption in transit: TLS (certificates) from user to ELB

Encryption at rest: Encryption for storage, volumes, snapshots, AMIs, databases

Separating VPC into Public/Private subnets - Security groups, and Networks ACLs

Using IAM to lock down permissions - Least privileged access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Where would you recommend no SQL database?

A

Example: DynamoDB

  • When you don’t care about relationships between the data
  • Data is not well structured/unpredictable (flexibility)
  • Need to be able to scale out quickly - horizontally
  • Need to handle a large amount of data with and you don’t need it to be 100% accurate (Eventual Consistency over strong consistency) (Online games, social media, etc)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How can you scale a web application

A

If it’s running on an EC2- and only for the web app tier

Vertically: Increase instance type

Horizontally:

  • Put the Web app servers into an EC2 Auto Scaling group across multiple AZs
  • Then attach an application load balancer to the EC2 Auto Scaling group to handle incoming traffic for the target group

Generally speaking - by increasing the number of resources available to support additional requests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is caching? what are ways of increasing caching?

A

Storing commonly accessed temporary files or request responses in - in a medium or area that allows for fast retrieval.

  • Increasing the cache size
  • Increasing the time to live in cache

Regarding CloudFront:

  • adding additional distributions,
  • or add files to s3 buckets(origin) that you want served up by the distribution
  • increasing the Cache-Control “max-age” for the distribution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How does NAT works and what the use cases for NAT

A

Network Address Translation (NAT) is a process that enables one, unique IP address to represent an entire group of computers

Network address translation permits a single device, such as a NAT firewall or NAT router or other network address translation device, to act as an agent between the public network and private networks—the internet and any local networks. This allows an entire group of devices to be represented by a single unique IP address when they do anything outside their network.

Outbound-
Private IP calls to the NAT service, it then forwards the request using the NAT’d IP, responses come back on this IP and are routed back to the private IP. External systems aren’t given the internal private IP

It keeps your internal network addresses from overlapping with external IP addresses. You can use any values within the cidr block without having to be concerned with the IP address that is going to be public facing as the NAT device will handle keeping track of private address that make requests out, and where the responses from external system will be returned to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Public Subnet versus Private Subnet?

A

Public Subnet is a grouping of IP’s that are setup with a route table that allows them to access the internet or be accessed by the internet through an internet gateway

Private Subnets are groups of IP’s that are internal only and do not need to access the internet (route table doesn’t have a route to an internet gateway). Or if they do need access to the internet they can use a NAT gateway in a public subnet, but these gateways do not accept traffic which initiated from the internet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to explain discuss cloud to c level executive.

A

Cloud computing is the on-demand delivery of IT resources over the Internet with pay-as-you-go pricing.

It’s access to computing power, storage, and databases on an as-needed basis, without having to buy, own, or maintain your own physical data centers. It drops the upfront cost of building datacenter or purchasing servers (Capitalized expenditure) and It’ll lower operating expenditures which are those running costs of keeping a data center going.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is the difference between Http and https

A

HTTP uses port 80 and is for unsecure regular web traffic

HTTPS uses port 443 along with TLS to allow for secure and encrypted communication for your web traffic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a DDOS attack

A

Distributed Denial of Service attack - It’s often a coordinated attack performed on a website from a single machine or sometimes many machines with the intent of overwhelming the resources on the servers hosting the website to take them down or stop the website from working.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

***Describe Cloud Computing architecture.

A

Well Architected Framework

  1. Operational Excellence
  2. Security
  3. Reliability
  4. Performance Efficiency
  5. Cost Optimization
  6. Sustainability
Network Services (Route 53, VPC)
Compute Services (ec2, lambda)
App Integration Services (SQS, SNS)
Storage Services (S3, EFS, EBS)
Database Services (RDS, DynamoDB)
Analytics Services (EMR,
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What’s a Docker container?

A

A Docker container is a running instance of a Docker container image

A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application:

  • code
  • runtime
  • system tools
  • system libraries
  • settings.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is JMeter?

A

Apache JMeter is an Apache project that can be used as a load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Database: What is a table scan?

A

A table scan is the reading of every row in a table and is caused by queries that don’t properly use indexes. Table scans on large tables take an excessive amounts of time and cause performance problems.

17
Q

What’s sharding?

A

Sharding is a method for distributing a single dataset across multiple databases, which can then be stored on multiple machines.

A database shard, or simply a shard, is a horizontal partition of data in a database or search engine. Each shard is held on a separate database server instance, to spread load. Some data within a database remains present in all shards, but some appears only in a single shard