Showing posts with label Learning. Show all posts
Showing posts with label Learning. Show all posts

2018-07-05

Getting Hit by a Boat - Defensive Design

In a group discussion last week – I heard a story (I could not find the origin – if you know where it comes from – please let me know) – which I would like to share with you.
John was floating out in the ocean, on his back, with his shades, just enjoying the sun, the quiet, the time to himself, not a care in the world.
When all of a sudden he got bumped on the head (not hard enough to cause any serious damage) with a small rowing boat.
John was pissed…. All sorts of thoughts running through his head.
  • Who gave the driver their license?
  • Why are they not more careful?
  • I could have been killed?
  • Why are they sailing out here – this is not even a place for boats.
And with all that anger and emotion he pulled himself over the side of the boat, ready to give the owner/driver one hell of a mouthful.
When he pulls himself over the side, he sees an empty boat. No–one there, no-one to scream at.
And at that moment all the anger and rage that was building up inside – slowly went away.
We encounter things every day – many of them we think are directly aimed at us – deliberately or not – but we immediately become all defensive, build up a bias against the other and are ready to go ballistic. Until we understand that there is no-one to direct all this emotion and energy at.
And then we understand that sometimes thing just happen, things beyond our control and we cannot or should not put our fate into some else’s hands.
That was the original story – which I really can relate to.
14221418411_385101705b_z
(Source: Flickr – Steenaire)
But before I heard the last part of the story – my mind took this to a totally different place – which is (of course) architecture related.
John was enjoying a great day in the sun – and all of a sudden he got hit in the head by a boat.
Where did that boat come from?
No-one knows.. I assume the owner had tied it up properly on the dock.
  • Maybe the rope was cut.
  • Maybe someone stole it and dumped it when they were done.
  • Maybe there was a storm that set the boat loose.
  • Or maybe there was a bloopers company that was following the boat all along to see who would get hit in the head.
There are endless options as to how the boat got there. But they all have something in common. The boat was never supposed to end up hitting John in the head.. John expected to be able to bake nicely in the sun and not be hit in the head by a boat
But what if John had taken additional precautionary measures?
  • Set up a fence / guardrail around where he was floating
  • Put someone as a lookout to warn him about floating boats
  • Have a drone above his head hooked into a heads-up-display in his sunglasses that he can see what is going around him
There are endless possibilities and you can really let your imagination take you to where you want to go as to how John could have prevented this accident.
What does this have to do with Defensive Design?
When we design an application – we think that we are going to be ok – because we expect to be able to do what we want to do without interference.
For example.
My web server is suppose to serve web requests of a certain type. I did not plan for someone crafting a specific request that would crash my server or bombarding the webserver with such an influx of traffic that would bring the application to its knees.
But then something unexpected happens.
When you design your application you will never be able to predict every possibility of attack or some esoteric ways  people are going to use your software. There is always something new that comes up – or someone thinks of a different way to use your idea that you did not even think of.
What you can do, is put some basic guardrails into your software that will protect you from what you do know or think can happen.
  • Throttling the number of connections or request – to prevent DDOS attacks.
  • Introducing circuit breakers to prevent cascading failures
  • Open only specific ports / sockets
  • Sufficient authentication to verify that you should be doing what you are supposed to
  • Monitoring for weird or suspicious behavior.
Again the options are practically endless. And you will not think of it all. You should address the issues as they happen, iterate, rinse, repeat.
That was a 4 minute read into thing that I think about during the day.
What kind of things do you think about when during your daily work? I would be interested in hearing. Please feel free to leave comments down below.

2017-04-28

3 Things I Learned - Week #17

As you might have noticed, weeks 15 and 16 are missing – life just got in the way – my apologies. Life does go on and so do I (and no – I am not going to post 9 things this week – to make up for it), so here are three thing that I learned this week.

  1. There is a great analogy of the On Pioneers, Settlers and Towns Planners Or Understanding My Personal Brand – from Matt Brender (now Broberg). I came across another great analogy of how your AWS VPC is built the same as a town - AWS VPC Core Concepts in an Analogy and Guide.
  2. An excellent read on - What is DevOps?
  3. As you might (or might not) know an AWS instance can assume a role assigned to it – and access the AWS API - as long as you have 3 things.
    - aws_access_key_id
    - aws_secret_access_key
    - default region
    The first two - are provided by the role - but the third is something you need to provide to the instance.

    Here is how you can extract this information from the API.

Next week in Memorial and Independence day in Israel. Have a great week!!

2017-04-07

3 Things I Learned - Week #14

I spent most of the half the week in Texas, and the other getting ready for Pesach. Here are 3 things that I learned this week.

  1. JFK was assassinated in 1963, and to this day – there are so many unanswered questions. It was interesting to see that two Jewish Orthodox Scholars (Weiss and Ashkenazi) played such an important part in uncovering the fact that there was a 4th shot from the grassy knoll.
  2. AWS now have a host based rules that you can use to apply to different target groups in their ELB. Read more details here -  New – Host-Based Routing Support for AWS Application Load Balancers.
  3. If you are having problems with your root partition of your Linux instance not automatically resizing to the full size larger than the original image (such as this) – then this tool will do the trick for you.

Pesach is here next week! Chag Sameach to you all !!

keep-calm-and-eat-matza-15

2017-04-01

3 Things I Learned - Week #13

I have spent most of the week here in Texas at an internal DevOps conference. As things go with these kind of events – the most interesting parts are always those where you speak to others – outside of the informal sessions.

Here are 3 things I learned this week.

  1. Our youth is amazing. My daughter was one of sixty 11th and 12th graders that presented the summary of here thesis that she has been doing in researching remodeling of neurons, neuro-transmitters, and the mushroom-body.

    The reason I say why youth is amazing – is because each of the presenters there – had completed if not as – but a more complicated research project.

    And yes I was an extremely proud father – watching her present at her first scientific conference.
  2. Lists are awesome. I just found a whole new world of awesome-lists. Have a look at the topic on github.com. I have to be careful to make sure that this does not become a time sink.

  3. AWS has a new resource tagging API. Looking further down the road with my journey to AWS – this is going to be very important and useful.

Catch you all next week!

2017-03-24

3 Things I Learned - Week #12

I am a bit late with this post – life has really gotten mad as I get ready for a trip to the US next week.

Here are 3 things I learned this week.

  1. Here is a great read on how taking control of AWS costs – can save you a huge amount of money -The million dollar engineering problem
  2. Here is a nice AWS solution based on Lambda to monitor if you are coming close to a resource limit on your AWS account (something that happened many times this week)
  3. Did you know that you can build a global transit network on AWS?

I think it is pretty obvious what I have been doing most of the past week – isn’t it? 

2017-03-17

3 Things I Learned - Week #11

Crazy week – but one of the best I have had. I work with an amazing team of people – who have accomplished the almost impossible.

Beside working weird and wild hours, here are 3 things that I learned this week.

  1. From dotCloud to Docker is a relaly good read about how docker started out a few years ago. It is hard to believe that is has evolved into what it has today.
  2. It seems that Gitlab is not going to be leaving the cloud after all.. Running your infrastructure is so much more that nut, bolts and how much money you pay to a provider at the end of the day. Gitlab was publicly discussing why they wanted to get off the cloud – and how they would do it, and this post explains that maybe you do need people that understand the underlying infra (all of it!!) if you choose to go the route of managing it all yourself.
    Really good read!
  3. Did you know that many hit songs are comprise of 4 basic chords?


    Awesome!!

Catch you all next week!

2017-03-10

3 Things I Learned - Week #10

Well – another week has gone by – and winter is practically over here in Israel. Learning never stops and here are 3 things that caught my eye this week.
  1. This is a great set of posts about how Evernote moved their whole infrastructure to Google Cloud.  Part 1, 2, 3, 4 and 5.
  2. docker-aws is a nifty little container – with all the tools  you will need to interact with AWS. A huge thumbs up from me on this one!
  3. It seems that I was the only one who really missed that Github have changed their TOS.

    Here are two different takes on the subject.
    what I would ask my lawyers about the new Github TOS and Rational thoughts on the GitHub ToS change.
Purim is here – catch you all next week!

2017-03-03

3 Things I Learned - Week #9

Honestly this week has not been my best – far too much going on at work – after work and yet there are always new things that I learn.

  1. I tried to upgrade my Raspberry Pi to an updated version – it did not go well. But all is not lost, after installing Minibian which is perfect for my needs – I was well on my way again with less RAM and resources in use.
  2. Amazon US-east-1 melted down this week, and took down a substantial number of dependent sites and businesses that rely on their services. US-east-1 is the oldest and biggest region that AWS has in use today. I was personally affected as well – as we have an ongoing project in that region.
  3. To continue the point above. There is so much to actually say – but this will lead to a whole new blog post. Two short point on the message that was posted last night.

    a. Human’s are the weakest link – there is no doubt about it.
    b. There are parts of AWS that have not been started in Years ! I don't know if I should be happy about that – or really really scared!

Have a great weekend and never stop learning!

2017-02-24

3 Things I Learned - Week #8

All in all this has been a good week – some ups, some downs – but knowledge is a never ending journey.

Here are some of the things I learned about over the last few days.

  1. Randy Bias wrote a very interesting point about how risky it can be to ‘check’ your into a CI/CD pipeline. Continuous Delusion at the Infrastructure Layer is a good read at understanding thta not everything belongs in the pipeline – you should consider how big your blast radius is.
  2. I am currently doing a Ambulance drivers course (that is the subject for a whole different post) but I never knew that there three different kinds of Hepatitis – where Hepatitis C – is the worst – and there is no cure known today.
  3. I did not even know that there were such large numbers Nine quintillion (9,223,372,036,854,775,808). Announcing the first SHA1 collision discovered this week by Google. I know that this is really nerdy – but still a good read.


2017-02-17

3 Things I Learned - Week #7

A week where our Prime Minister Benyamin Netanyahu went to visit President Trump in the U.S. will always be an interesting one – no matter how you look at it.

Here are some things that enriched my knowledge this week.

  1. One of the things that someone told me regarding AWS and IAM roles attached to a instance – was that you only have a single chance of assigning a role, and once you do it, that’s it – no going back.
    So it seems that this is not the case. Attach an AWS IAM Role to an Existing Amazon EC2 Instance by Using the AWS CLI will show you the light and how to change a role after an instance has been provisioned.

  2. S3 is a great webserver – specifically if all you need to do is serve files. One such a repository that fits the bill perfectly – is a yum repo. There are hundreds of ways to do this, but this is the only one that I could find that would allow you to create a yum repo with multiple versions (with minor differences between them) – without having to duplicate the packages for each and every version.

  3. Never underestimate the powers of Social Networking. And of course – there are just some people who are just willing to sit down and have a conversation about technology. One such person is Kelsey Hightower. Thank you!

2017-02-10

3 Things I Learned - Week #6

Where has the time gone by? This past week – I was up to my neck in architectural discussions and meetings for a big upcoming project on AWS.

Nevertheless - here are three things I learned this week.

  1. Many a time I want to look at a file and what better way to do that than with less <filename>. But then comes that moment where you want to actually edit the because you see a mistake. So instead of exiting the file and then opening it up again in vi – try this.

    Edit a File When You Are Viewing It Using more / less Command Pager
  2. I did some digging into NTP this week. How to secure NTP, the different Stratum levels, and how to read the weird output from ntpq –p. These articles were very helpful.

    How to debug ntp issues?
    Real Life NTP
  3. I use Cisco Spark daily as my main medium for communication at work. I love it.

    Here is a useful list of Keyboard shortcuts – that will save you some throughout your day.

Catch you all next week!!

2017-02-03

3 Things I Learned - Week #5

January has come and gone – and of course this week is no different than the last – always something new.

  1. Exposing everything to the outside world is never a good idea, but there are times where you have to leave something open in order to manage everything else in the remote location. That is where a bastion host comes in.

    How to Record SSH Sessions Established Through a Bastion Host – is a really interesting way of monitoring what is happening on this node – and how to create an audit trail.
  2. Gitlab had a meltdown this week. Two lessons I learned from this mess.
    1. make sure you have proper backups.
    2. Backups are not worth anything – unless they have been validated
  3. The AWS Spot marketplace is a fascinating concept, something that I am not yet comfortable using – but will be happy to learn more about

Till next week!!

2017-01-27

3 Things I learned - Week #4

Another week has gone by.

  1. Children have a totally different outlook on life. At a family meal this week we were talking about life insurance – why it is needed – and how that money can help the family that is left behind in a financial way.

    My 11 year daughter asked – what would we do with all of her money – if something would actually happen to her (heaven forbid). The numbers that the adults were talking about were in the 7 digit figures and the amount she was talking about was her life savings – somewhere around $500.

    I learned a very important lesson from this conversation. The amount she has was just as important and worth just as much to her  as the amounts we talking about.

    People cherish what they have – no matter how much it is worth – worth is only in the eyes of the beholder.

  2. Sometimes you just want to have a simple bloody if… then… else…
    Bashing my head against the wall for a number of hours finally brought me to this ternary. This is the closest I option I could find for my quest.
  3. IRC – Do you remember that thing from the 1990’s – Well it is alive and kicking – being used heavily – by a large number of Opensource communities. The Ansible community uses IRC as well – which is where I found out about the point above.

    My thanks go out to all those community members (regardless of the community they belong to) who are willing to answer the same silly questions from newbies – with such patience.

2017-01-20

3 Things I Learned - Week #3

This week has been a busy one. So here goes…
  1. Netflix is big.. Really big. Their monthly bill is 100’s of MB in size, it contains over 800 million lines of information. Netflix has a dedicated Hadoop cluster – whose only purpose is to load their bill (I find that hilarious!)

    Seriously though – this presentation from AWS re:Invent 2016 is a treasure trove of information – and well worth spending less than an hour on.



  2. Synchronizing two completely different git repos is not that difficult – but when they are hosted on two completely different providers (github.com and bitbucket.org) then it not simple.

    gitwatch helped me solve that issue.
  3. Writing an ‘artificial intelligence’ is not a simple task – and people don’t like interacting with robots – they prefer of course to interact with humans. I guess that my preference for interacting with a bot would be to not even know that it is a bot – it should be as human as possible – its name, its behavior and its responses.

    So giving your Bot a name might not be the best idea
Till Next Week!

2017-01-13

3 Things I Learned - Week #2

We are constantly learning, evolving and improving (well at least I hope we are).

Personally I learn new things each and every day, not all of them are technology related, but still – I am pleased to say that knowledge is really infinite and we should actually never stop.

I am going to try and post a short note with three (it will sometimes be hard) things that I learned about this week. They will not be lengthy topics – just a byte size sentence with a link or two on the subject.

Starting from today – I hope to make this a weekly occurrence.

  1. The Mandella Effect. Are we actually living in a parallel universe – some of these 20 Examples Of The Mandela Effect That'll Make You Believe You're In A Parallel Universe. The one that really blew me away was “No, I am your father”
    image
  2. How do you find the TTL on a specific DNS record? – Sometimes you really need to know how long you (or your customers) are going to have stare at the wrong content – until their clients perform a refresh.
  3. Even if you run for a seat on the OpenStack Individual Member Director Elections – you should not be spamming all of the community each and every day to remind them to vote for you.
    By the way – if you have not voted yet – then you should.

Till next week!!