Skip to content

Commit c65212b

Browse files
author
abregman
committed
Add a couple of questions
1 parent 8638107 commit c65212b

File tree

3 files changed

+50
-3
lines changed

3 files changed

+50
-3
lines changed

README.md

+50-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
:information_source:  This repository contains questions on various DevOps and SRE related topics
44

5-
:bar_chart:  There are currently **781** questions
5+
:bar_chart:  There are currently **786** questions
66

77
:books:  To learn more about DevOps check the resources in [DevOpsBit.com](https://devopsbit.com)
88

@@ -2905,7 +2905,21 @@ There is a more advanced python feature called MetaClasses that aid the programm
29052905
</b></details>
29062906

29072907
<details>
2908-
<summary> What is an error? What is an exception? What types of exceptions are you familiar with?</summary><br><b>
2908+
<summary>Explain and demonstrate class attributes & instance attributes</summary><br><b>
2909+
2910+
In the following block of code `x` is a class attribute while `self.y` is a instance attribute
2911+
2912+
```
2913+
class MyClass(object):
2914+
x = 1
2915+
2916+
def __init__(self, y):
2917+
self.y = y
2918+
```
2919+
</b></details>
2920+
2921+
<details>
2922+
<summary>What is an error? What is an exception? What types of exceptions are you familiar with?</summary><br><b>
29092923

29102924
```
29112925
# Note that you generally don't need to know the compiling process but knowing where everything comes from
@@ -3054,7 +3068,7 @@ some_list[:3]
30543068
</b></details>
30553069

30563070
<details>
3057-
<summary>How to sort list be the length of items?</summary><br><b>
3071+
<summary>How to sort list by the length of items?</summary><br><b>
30583072

30593073
```
30603074
sorted_li = sorted(li, key=len)
@@ -3381,11 +3395,14 @@ colums = list(zip(*(rows)))
33813395

33823396
<details>
33833397
<summary>What is the result of each of the following?
3398+
33843399
```
33853400
>> ', '.join(["One", "Two", "Three"])
33863401
>> " ".join("welladsadgadoneadsadga".split("adsadga")[:2])
33873402
>> "".join(["c", "t", "o", "a", "o", "q", "l"])[0::2]
3403+
```
33883404
</summary><br><b>
3405+
33893406
```
33903407
>>> 'One, Two, Three'
33913408
>>> 'well done'
@@ -3466,6 +3483,7 @@ the_list.sort(key=lambda x: x[1])
34663483

34673484
<details>
34683485
<summary>Explain the following:
3486+
34693487
* zip()
34703488
* map()
34713489
* filter()</summary><br><b>
@@ -5675,6 +5693,24 @@ Not only this will tell you what is expected from you, it will also provide big
56755693

56765694
## Design
56775695

5696+
#### Architecture
5697+
5698+
<details>
5699+
<summary>Explain "3-Tier Architecture" (including pros and cons)</summary><br><b>
5700+
</b></details>
5701+
5702+
<details>
5703+
<summary>What are the drawbacks of monolithic architecture?</summary><br><b>
5704+
5705+
* Not suitable for frequent code changes and the ability to deploy new features
5706+
* Not designed for today's infrastructure (like public clouds)
5707+
* Scaling a team to work monolithic architecture is more challenging
5708+
</b></details>
5709+
5710+
<details>
5711+
<summary>What are the advantages of micro-services architecture over a monolithic architecture?</summary><br><b>
5712+
</b></details>
5713+
56785714
#### Scalability
56795715

56805716
<details>
@@ -5695,6 +5731,17 @@ Horizontal Scaling is the process of adding more resources that will be able han
56955731
</summary><br><b>
56965732
</b></details>
56975733

5734+
<details>
5735+
<summary>What is the problem with the following architecture and how would you fix it?<br>
5736+
<img src="images/design/producers_consumers_issue.png" width="300x;" height="200px;"/>
5737+
</summary><br><b>
5738+
5739+
The load on the producers or consumers may be high which will then cause them to hang or crash.<br>
5740+
Instead of working in "push mode", the consumers can pull tasks only when they are ready to handle them. It can be fixed by using a streaming platform like Kafka, Kinesis, etc. This platform will make sure to handle the high load/traffic and pass tasks/messages to consumers only when the ready to get them.
5741+
5742+
<img src="images/design/producers_consumers_fix.png" width="300x;" height="200px;"/>
5743+
</b></details>
5744+
56985745
<details>
56995746
<summary>Users report that there is huge spike in process time when adding little bit more data to process as an input. What might be the problem?<br>
57005747
<img src="images/design/input-process-output.png" width="300x;" height="200px;"/>
36 KB
Loading
29.3 KB
Loading

0 commit comments

Comments
 (0)