exam_2021-retake Flashcards

1
Q

What is the AFK scale cube?

A

It is a model for segmenting services, defining micro-services and scaling products.

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

What are the axis’ of AFK scale cube?

A

X-Axis: Horizontal duplication and cloning of services and data
Y-Axis: Functional Decomposition and segmentation
Z-Axis: Service and data partitioning along customer boundaries

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

What is horizontal duplication?

A

One monolithic system/service > many systems, each a clone and load balanced

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

What is y-Axis

A

Split by function, method, service or dissimilar things

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

What is Z-Axis?

A

Split by similar things. For example, customers

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

Q1.A Explain the difference between service partitioning and data partitioning inthe AKF scale cube, and give an example of each

A

Splitting services is on the Y-Axis according to AFK scale cube, data partitioning on the Z-Axis. You can split services by separating the webserver from the database. You can do data partitioning by splitting a database (sharding) based on customer ID’s for example.

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

Q1.B At one point, Google search introduced extra layers between the web frontend and the servers holding the partitions of the index. Why did they have to introduce these layers?

A

They introduced caching servers. These have a hit rate of 30-60% and are capable of handling a whole lot of traffic

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

What is a race condition?

A

When the code is trying to do two or more things at once, and the result changes depending on the order they occur in

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

What is one simple solution against race conditions?

A

To place all the requests in a queue and refuse to answer any requests until the previous one is completed

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

What is the problem with placing all requests in a queue and refusing any further requests to prevent race conditions?

A

It doesn’t scale. That’s how old computers work, single-threaded.

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

When is using a queue and refusing further requests a good solution

A

If you absolutely must count everything accurately, in real time. For example, a large festival with lots of requests where it can’t allow collisions.

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

What is alternative to using this queueing system that does scale well?

A

Eventual consistency

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

What is eventual consistency?

A

Each server holds it’s own count. It will update the central system when there’s time to do so. (it can also be seconds apart, doesn’t have to be hours).

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

When is eventual consistency a bad design choice?

A

When a change needs to be made immediately. For example, the privacy settings of a youtube video (private or public)

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

Why are youtube views not accurate?

A

This is because of caching. Caching holds the data and serves it to the customer quickly. A site like youtube has many, many caching servers and each time you can be routed to a different caching server.
Eventually, eventual consistency will take place and everything will be sorted out at some point

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

Q1.C Google Search replaced batch processing to create the index to a more incremental method of keeping the index up-to-date. Why did they want to make this replacement?

A

They wanted to make this replacement because the batch process via MapReduce resulted in documents not showing up in search results for 2-3 days. They needed a lower “time from crawl-to-search-hit”. Solution was:

  • New data storage system: Colossus / BigTable
  • Event-driven, incremental processing: Caffeine / Percolator
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is batch processing?

A

It gives you the ability to execute multiple operations in one request, rather than having to submit each operation individually

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

Q1.D What problem is avoided by Google by time-stamping the contents of a BigTable cell?

A

Because of versioning by timestamps there are no write-write conflicts on a cell. As we will see: when replicated, eventual
consistency is used.

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

Q1.E Briefly explain why virtualisation is considered a scaling technique?

A

It lets you run multiple operating systems and applications on a single server, consolidate hardware to get higher productivity from fewer servers and simplify the management, maintenance and the deployment of new applications

20
Q

Q2.A The parameters of a remote procedure call can be of 3 types: in, out, or inout. What are these?

A

in: object is transffered from client to service, only used for inputs
out: object is transferred from client to service only used for outputs
inout: object is transferred from client to service used for both inputs and outputs

21
Q

Q2 TODO

A

TODO

22
Q

Q3.A You are the administrator of an application that consists of web serverrs on 3 machines and a database on 1 (seperate) machine. The vendor of the application wants to change the application components (web server, database) from running natively to running inside a container. Discuss how this change would affect the performance of your application

A

There are some cases in which virtualisation offers performance benefits but these are quite rare, normally. Typically, the overhead of a hypervisor is around 1-5% of CPU and memory overhead.
By using some of VMware’s memory management techniques you can eliminate the memory overhead IF, and only IF, you are using multiple VM’s onto hosts. Using 1 VM will always be slower.
HOWEVER, while you lose some slight performance, virtualisation is about management. With virtualisation you can easily scale to 20 or 40 VM’s on each host

23
Q

Q3.B TODO

A

TODO

24
Q

Q3.C Classify firecracker into the virtualisation taxonomy discussed in class

A

These are system VMs capable of running a the same ISA (Linux)

25
Q

What is firecracker

A

Open source virtualisation technology that enables you to deploy workloads in lightweight virtual machines called microVMs which provide enhanced security and workload isolation over traditional VMs

26
Q

What is the virtualisation taxonomy?

A
You have 
Process VMs:
- Same ISA
- Different ISA
System VMS:
- Same ISA
- Different ISA
27
Q

Q3.D Give one similarity and one difference between firecracker and unikernels

A

The similarity is that they both offer significant performance improvements by excluding unnecessary devices and guest functionality.
The difference is that firecracker runs in user-space and unikernels in kernel-space

28
Q

What are unikernels?

A

They optimise a VM for one application. You strip unused parts of OS and libraries

29
Q

Where does firecracker run in?

A

It runs in user space

30
Q

What is gVisor?

A

Provides a virtualised environment in order to sandbox containers.

31
Q

gVisor advocates itself as third secure environment for running containerised applications, next to machine-level virtualisation and rule-based execution (such as SELinux). What disadvantages of the two others does it try to solve?

A

gVisor intercepts application system calls and acts as the guest kernel, without the need for translation through virtualised hardware.

32
Q

What are the different layers of gVisor?

A
  1. Machine-level virtualisation (such as KVM, XEN), exposes virtualised hardware to a guest kernel via a virtual machine monitor
  2. Rule-based execution, such as SELinux.
  3. Intercepts application system calls and acts as the guest kernel, without the need for translation through virtualised hardware.
33
Q

4.A If we did not have dedicated configuration management tools like Ansible and Puppet, could an organisation still use Infrastructure as Code? Briefly argue why or why not?

A

Yes, IaC is the process of managing and provisioning computer data centers through machine-readable definition files. You don’t need a tool for this, it’s more about the methodology behind it which can help reduce cost speed and risks

34
Q

What are the advantages of IaC?

A

Cost
Speed
Risk

35
Q

What is cost advantage IaC?

A

By removing the manual component, people are able to refocus their efforts towards other enterprise tasks

36
Q

What is speed IaC?

A

Infrastructure automation enables speed through faster execution when configuring your infrastructure and aims at providing visibility to help other teams across the enterprise work quickly and more efficiently

37
Q

What is risk IaC?

A

Automation removes the risk associated with human error, like manual misconfiguration; removing this can decrease downtime and increase reliability

38
Q

Q4.B Some daemons reload their configuration files when they sense a change, causing downtime for that daemon. How do configuration management tools avoid this side effect?

A

I believe tools such as ansible have configurable parameters to specify whether daemons should be related. The default option is not to do so

39
Q

Q4.C Name 3 important pieces of information that IaC should record about a change

A

The change itself, the timestamp and the initial version

40
Q

How can you improve communication?

A

Chatrooms (force people to be online)

Virtual and physical standups

41
Q

Q4.D Explain why duvel beer is an important tool in DevOps

A

You want smaller changes to be happening throughout the week and not one massive change on a friday afternoon when everyone will go for drinks after?

42
Q

What is idempotence?

A

No changes when the same state is applied again

43
Q

Q5.A In your new job you are asked to migrate an “All Eggs in One Basket” server to setup with different virtual machines for each service. Briefly describe how you would perform such a migration?

A

Before migrating, I would ensure that I first create a backup. Then I would create a clone, so that you have the system still running, and a backup in case it goes down. Inside the clone I would setup the virtual machines which should be a machine each for each service to improve performance and it also gives management + security benefits. This should be done following IaC so that it’s reproduce-able. After the set up is fully working and tested, I would create a new VM to test if the whole configuration works. Then, the IaC can be used to configure a production instance (first shadowing the initial system). If all is well, it can replace the initial system. Again, a backup should be made of the new system.

44
Q

Q5.B The book advises against using desktop hardware to run services. Yet google and other big services have been built around such hardware. Briefly describe how one can build such services from desktop components.

A

1KW = 3412 BTUs
So, 3.52 x 3412 = 12010 of cooling
12010 / 1725 = 6.96
So you can cool about 7 servers (if, and only if, they are not all generating the full heat for a longer period of time, which is unlikely)

45
Q

How much BTUs is 1KW

A

1KW = 3412 BTUs

46
Q

Why do you, as an IT department providing a service, have to be very careful what goes into a SLA between you and a business unit in your company

A

The SLA is a commitment between a service provider and a client. It defines the level of service being sold in plain language terms with definitions about mean time between failures, mean time to repair or mean time to recover. You also identify which party is responsible for reporting faults or paying fees.