From 8e691b56817e4b5f24f2811fe7215239f38db7d8 Mon Sep 17 00:00:00 2001 From: bregman-arie Date: Sat, 25 Mar 2023 17:41:32 +0000 Subject: [PATCH] Update README index --- README.md | 318 ++++--------------- images/logos/grafana.png | Bin 0 -> 8955 bytes images/{monitoring.png => observability.png} | Bin topics/databases/README.md | 191 +++++++++++ topics/observability/README.md | 88 +++++ 5 files changed, 336 insertions(+), 261 deletions(-) create mode 100644 images/logos/grafana.png rename images/{monitoring.png => observability.png} (100%) create mode 100644 topics/databases/README.md create mode 100644 topics/observability/README.md diff --git a/README.md b/README.md index 4c47d28..378cae8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ :information_source:  This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE -:bar_chart:  There are currently **2621** exercises and questions +:bar_chart:  There are currently **2624** exercises and questions :warning:  You can use these for preparing for an interview but most of the questions and exercises don't represent an actual interview. Please read [FAQ page](faq.md) for more details @@ -18,74 +18,82 @@
- - - - + + - - + + + - + - - - - - - - - - - - - - - - - - - - - - + - - + - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - + + + + + + + - + + +
DevOps
DevOps
cicd
CI/CD
Git
Git
ansible
Ansible
DevOps
DevOps
Git
Git
Network
Network
Hardware
Hardware
kubernetes
Kubernetes
programming
Software Development
programming
Software Development
Python
Python
go
Go
Bash
Shell Scripting
kubernetes
Kubernetes
Cloud
Cloud
aws
AWS
azure
Azure
Google Cloud Platform
Google Cloud Platform
openstack
OpenStack
Operating System
Operating System
Monitoring
Monitoring
Elastic
Elastic
Virtualization
Virtualization
DNS
DNS
Testing
Testing
Databases
Databases
perl
Perl
RegEx
Regex
Design
System Design
Hardware
Hardware
Certificates
Certificates
Containers
Containers
sql
SQL
OpenShift
OpenShift
Storage
Storage
Cloud
Cloud
aws
AWS
azure
Azure
Google Cloud Platform
Google Cloud Platform
openstack
OpenStack
Terraform
Terraform
Operating System
Operating System
Linux
Linux
Virtualization
Virtualization
DNS
DNS
Bash
Shell Scripting
Databases
Databases
sql
SQL
Mongo
Mongo
Testing
Testing
Big Data
Big Data
cicd
CI/CD
Certificates
Certificates
Containers
Containers
OpenShift
OpenShift
Storage
Storage
Terraform
Terraform
puppet
Puppet
Distributed
Distributed
you
Questions you can ask
ansible
Ansible
Circle CI
Circle CI
Argo
Argo
Kafka
Kafka
DataDog
perl
Perl
observability
Observability
Prometheus
Prometheus
Circle CI
Circle CI
DataDog
Grafana
Grafana
Linux
Linux
Prometheus
Prometheus
Big Data
Big Data
HR
Soft Skills
security
Security
Argo
Argo
HR
Soft Skills
security
Security
Design
System Design
Chaos Engineering
Chaos Engineering
Chaos Engineering
Chaos Engineering
Misc
Misc
Elastic
Elastic
Kafka
Kafka
@@ -868,60 +876,6 @@ The introduction of virtual machines allowed companies to deploy multiple busine Do we need virtual machines in the age of containers? Are they still relevant?
-## Monitoring - -
-Explain monitoring. What is it? What its goal?
- -Google: "Monitoring is one of the primary means by which service owners keep track of a system’s health and availability". -
- -
-What is wrong with the old approach of watching for a specific value and trigger an email/phone alert while value is exceeded?
- -This approach require from a human to always check why the value exceeded and how to handle it while today, it is more effective to notify people only when they need to take an actual action. -If the issue doesn't require any human intervention, then the problem can be fixed by some processes running in the relevant environment. -
- -
-What types of monitoring outputs are you familiar with and/or used in the past?
- -Alerts
-Tickets
-Logging
-
- -
-What is the difference between infrastructure monitoring and application monitoring? (methods, tools, ...)
-
- -### Application Performance Management - -
-What is Application Performance Management?
- -- IT metrics translated into business insights -- Practices for monitoring applications insights so we can improve performances, reduce issues and improve overall user experience -
- -
-Name three aspects of a project you can monitor with APM (e.g. backend)
- -- Frontend -- Backend -- Infra -- ... -
- -
-What can be collected/monitored to perform APM monitoring?
- -- Metrics -- Logs -- Events - Traces -
- ## Prometheus
@@ -3122,164 +3076,6 @@ Not only this will tell you what is expected from you, it will also provide big
-## Databases - -|Name|Topic|Objective & Instructions|Solution|Comments| -|--------|--------|------|----|----| -| Message Board Tables | Relational DB Tables | [Exercise](topics/databases/table_for_message_board_system.md) | [Solution](topics/databases/solutions/table_for_message_board_system.md) - -
-What is a relational database?
- - * Data Storage: system to store data in tables - * SQL: programming language to manage relational databases - * Data Definition Language: a standard syntax to create, alter and delete tables -
- -
-What does it mean when a database is ACID compliant?
- -ACID stands for Atomicity, Consistency, Isolation, Durability. In order to be ACID compliant, the database must meet each of the four criteria - -**Atomicity** - When a change occurs to the database, it should either succeed or fail as a whole. - -For example, if you were to update a table, the update should completely execute. If it only partially executes, the -update is considered failed as a whole, and will not go through - the DB will revert back to it's original -state before the update occurred. It should also be mentioned that Atomicity ensures that each -transaction is completed as it's own stand alone "unit" - if any part fails, the whole statement fails. - -**Consistency** - any change made to the database should bring it from one valid state into the next. - -For example, if you make a change to the DB, it shouldn't corrupt it. Consistency is upheld by checks and constraints that -are pre-defined in the DB. For example, if you tried to change a value from a string to an int when the column -should be of datatype string, a consistent DB would not allow this transaction to go through, and the action would -not be executed - -**Isolation** - this ensures that a database will never be seen "mid-update" - as multiple transactions are running at -the same time, it should still leave the DB in the same state as if the transactions were being run sequentially. - -For example, let's say that 20 other people were making changes to the database at the same time. At the -time you executed your query, 15 of the 20 changes had gone through, but 5 were still in progress. You should -only see the 15 changes that had completed - you wouldn't see the database mid-update as the change goes through. - -**Durability** - Once a change is committed, it will remain committed regardless of what happens -(power failure, system crash, etc.). This means that all completed transactions -must be recorded in non-volatile memory. - -Note that SQL is by nature ACID compliant. Certain NoSQL DB's can be ACID compliant depending on -how they operate, but as a general rule of thumb, NoSQL DB's are not considered ACID compliant -
- -
-What is sharding?
- -Sharding is a horizontal partitioning. - -Are you able to explain what is it good for? -
- -
-You find out your database became a bottleneck and users experience issues accessing data. How can you deal with such situation?
- -Not much information provided as to why it became a bottleneck and what is current architecture, so one general approach could be
-to reduce the load on your database by moving frequently-accessed data to in-memory structure. -
- -
-What is a connection pool?
- -Connection Pool is a cache of database connections and the reason it's used is to avoid an overhead of establishing a connection for every query done to a database. -
- -
-What is a connection leak?
- -A connection leak is a situation where database connection isn't closed after being created and is no longer needed. -
- -
-What is Table Lock?
-
- -
-Your database performs slowly than usual. More specifically, your queries are taking a lot of time. What would you do?
- -* Query for running queries and cancel the irrelevant queries -* Check for connection leaks (query for running connections and include their IP) -* Check for table locks and kill irrelevant locking sessions -
- -
-What is a Data Warehouse?
- -"A data warehouse is a subject-oriented, integrated, time-variant and non-volatile collection of data in support of organisation's decision-making process" -
- -
-Explain what is a time-series database
-
- -
-What is OLTP (Online transaction processing)?
-
- -
-What is OLAP (Online Analytical Processing)?
-
- -
-What is an index in a database?
- -A database index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records. -
- -
-What data types are there in relational databases?
-
- -
-Explain Normalization
- -Data that is used multiple times in a database should be stored once and referenced with a foreign key.
-This has the clear benefit of ease of maintenance where you need to change a value only in a single place to change it everywhere. -
- -
-Explain Primary Key and Foreign Key
- -Primary Key: each row in every table should a unique identifier that represents the row.
-Foreign Key: a reference to another table's primary key. This allows you to join table together to retrieve all the information you need without duplicating data. -
- -
-What types of data tables have you used?
- - * Primary data table: main data you care about - * Details table: includes a foreign key and has one to many relationship - * Lookup values table: can be one table per lookup or a table containing all the lookups and has one to many relationship - * Multi reference table -
- -
-What is ORM? What benefits it provides in regards to relational databases usage?
- -[Wikipedia](https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping): "is a programming technique for converting data between incompatible type systems using object-oriented programming languages" - -In regards to the relational databases: - - * Database as code - * Database abstraction - * Encapsulates SQL complexity - * Enables code review process - * Enables usage as a native OOP structure -
- -
-What is DDL?
- -[Wikipedia](https://en.wikipedia.org/wiki/Data_definition_language): "In the context of SQL, data definition or data description language (DDL) is a syntax for creating and modifying database objects such as tables, indices, and users." -
- ## Regex Given a text file, perform the following exercises diff --git a/images/logos/grafana.png b/images/logos/grafana.png new file mode 100644 index 0000000000000000000000000000000000000000..b0cd0621507c12529bbbb862a4a0f6f81ba9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NepHxAWlIQii9=nv5^kstnD z^1MKU;U51=z?M+Gr_8aTvo(|`MB=o{>G(AXrLd^vAM8(lwWpNol|!g6_-Gm`y2|Z} H_Mra(hao9z literal 0 HcmV?d00001 diff --git a/images/monitoring.png b/images/observability.png similarity index 100% rename from images/monitoring.png rename to images/observability.png diff --git a/topics/databases/README.md b/topics/databases/README.md new file mode 100644 index 0000000..db5f679 --- /dev/null +++ b/topics/databases/README.md @@ -0,0 +1,191 @@ +# Databases + +- [Databases](#databases) + - [Exercises](#exercises) + - [Questions](#questions) + - [SQL](#sql) + - [Time Series](#time-series) + +## Exercises + +|Name|Topic|Objective & Instructions|Solution|Comments| +|--------|--------|------|----|----| +| Message Board Tables | Relational DB Tables | [Exercise](topics/databases/table_for_message_board_system.md) | [Solution](topics/databases/solutions/table_for_message_board_system.md) + +## Questions + + +
+What type of databases are you familiar with?
+ +Relational (SQL) +NoSQL +Time serties +
+ +### SQL + +
+What is a relational database?
+ + * Data Storage: system to store data in tables + * SQL: programming language to manage relational databases + * Data Definition Language: a standard syntax to create, alter and delete tables + +
+ +
+What does it mean when a database is ACID compliant?
+ +ACID stands for Atomicity, Consistency, Isolation, Durability. In order to be ACID compliant, the database must meet each of the four criteria + +**Atomicity** - When a change occurs to the database, it should either succeed or fail as a whole. + +For example, if you were to update a table, the update should completely execute. If it only partially executes, the +update is considered failed as a whole, and will not go through - the DB will revert back to it's original +state before the update occurred. It should also be mentioned that Atomicity ensures that each +transaction is completed as it's own stand alone "unit" - if any part fails, the whole statement fails. + +**Consistency** - any change made to the database should bring it from one valid state into the next. + +For example, if you make a change to the DB, it shouldn't corrupt it. Consistency is upheld by checks and constraints that +are pre-defined in the DB. For example, if you tried to change a value from a string to an int when the column +should be of datatype string, a consistent DB would not allow this transaction to go through, and the action would +not be executed + +**Isolation** - this ensures that a database will never be seen "mid-update" - as multiple transactions are running at +the same time, it should still leave the DB in the same state as if the transactions were being run sequentially. + +For example, let's say that 20 other people were making changes to the database at the same time. At the +time you executed your query, 15 of the 20 changes had gone through, but 5 were still in progress. You should +only see the 15 changes that had completed - you wouldn't see the database mid-update as the change goes through. + +**Durability** - Once a change is committed, it will remain committed regardless of what happens +(power failure, system crash, etc.). This means that all completed transactions +must be recorded in non-volatile memory. + +Note that SQL is by nature ACID compliant. Certain NoSQL DB's can be ACID compliant depending on +how they operate, but as a general rule of thumb, NoSQL DB's are not considered ACID compliant +
+ +
+What is sharding?
+ +Sharding is a horizontal partitioning. + +Are you able to explain what is it good for? +
+ +
+You find out your database became a bottleneck and users experience issues accessing data. How can you deal with such situation?
+ +Not much information provided as to why it became a bottleneck and what is current architecture, so one general approach could be
+to reduce the load on your database by moving frequently-accessed data to in-memory structure. +
+ +
+What is a connection pool?
+ +Connection Pool is a cache of database connections and the reason it's used is to avoid an overhead of establishing a connection for every query done to a database. +
+ +
+What is a connection leak?
+ +A connection leak is a situation where database connection isn't closed after being created and is no longer needed. +
+ +
+What is Table Lock?
+
+ +
+Your database performs slowly than usual. More specifically, your queries are taking a lot of time. What would you do?
+ +* Query for running queries and cancel the irrelevant queries +* Check for connection leaks (query for running connections and include their IP) +* Check for table locks and kill irrelevant locking sessions +
+ +
+What is a Data Warehouse?
+ +"A data warehouse is a subject-oriented, integrated, time-variant and non-volatile collection of data in support of organisation's decision-making process" +
+ +
+Explain what is a time-series database
+
+ +
+What is OLTP (Online transaction processing)?
+
+ +
+What is OLAP (Online Analytical Processing)?
+
+ +
+What is an index in a database?
+ +A database index is a data structure that improves the speed of operations in a table. Indexes can be created using one or more columns, providing the basis for both rapid random lookups and efficient ordering of access to records. +
+ +
+What data types are there in relational databases?
+
+ +
+Explain Normalization
+ +Data that is used multiple times in a database should be stored once and referenced with a foreign key.
+This has the clear benefit of ease of maintenance where you need to change a value only in a single place to change it everywhere. +
+ +
+Explain Primary Key and Foreign Key
+ +Primary Key: each row in every table should a unique identifier that represents the row.
+Foreign Key: a reference to another table's primary key. This allows you to join table together to retrieve all the information you need without duplicating data. +
+ +
+What types of data tables have you used?
+ + * Primary data table: main data you care about + * Details table: includes a foreign key and has one to many relationship + * Lookup values table: can be one table per lookup or a table containing all the lookups and has one to many relationship + * Multi reference table +
+ +
+What is ORM? What benefits it provides in regards to relational databases usage?
+ +[Wikipedia](https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping): "is a programming technique for converting data between incompatible type systems using object-oriented programming languages" + +In regards to the relational databases: + + * Database as code + * Database abstraction + * Encapsulates SQL complexity + * Enables code review process + * Enables usage as a native OOP structure +
+ +
+What is DDL?
+ +[Wikipedia](https://en.wikipedia.org/wiki/Data_definition_language): "In the context of SQL, data definition or data description language (DDL) is a syntax for creating and modifying database objects such as tables, indices, and users." +
+ +### Time Series + +
+What is Time Series database?
+ +A database designed specifically for time series based data. + +It comes with multiple optimizations: + +: complete this :) +
\ No newline at end of file diff --git a/topics/observability/README.md b/topics/observability/README.md new file mode 100644 index 0000000..d388b62 --- /dev/null +++ b/topics/observability/README.md @@ -0,0 +1,88 @@ +# Observability + +- [Observability](#observability) + - [Monitoring](#monitoring) + - [Data](#data) + - [Application Performance Management](#application-performance-management) + +
+What's Observability?
+
+ +## Monitoring + +
+What's monitoring? How is it related to Observability?
+ +Google: "Monitoring is one of the primary means by which service owners keep track of a system’s health and availability". +
+ +
+What types of monitoring outputs are you familiar with and/or used in the past?
+ +Alerts
+Tickets
+Logging
+
+ +## Data + +
+Can you mention what type of things are often montiored in the IT industry?
+ +- Hardware (CPU, RAM, ...) +- Infrastructure (Disk capacity, Network latency, ...) +- App (Status code, Errors in logs, ...) +
+ +
+Explain "Time Series" data
+ +Time series data is sequenced data, measuring certain parameter in ordered (by time) way. + +An example would be CPU utilization every hour: + +``` +08:00 17 +09:00 22 +10:00 91 +``` +
+ +
+Explain data aggregation
+ +In monitoring, aggregating data is basically combining collection of values. It can be done in different ways like taking the average of multiple values, the sum of them, the count of many times they appear in the collection and other ways that mainly depend on the type of the collection (e.g. time-series would be one type). + +
+ + +## Application Performance Management + +
+What is Application Performance Management?
+ +- IT metrics translated into business insights +- Practices for monitoring applications insights so we can improve performances, reduce issues and improve overall user experience + +
+ +
+Name three aspects of a project you can monitor with APM (e.g. backend)
+ +- Frontend +- Backend +- Infra +- ... + +
+ +
+What can be collected/monitored to perform APM monitoring?
+ +- Metrics +- Logs +- Events +- Traces + +