Thursday 11 October 2012

Quote: ACK packets and Quality of Service (qos)

"When you download, your computer needs to send (upload) ACK packets. These are basically saying "yep, I got that part of the download OK". If the computer you are downloading from detects that an ACK has not been received, it assumes that the data was not received and sends it again. The rate at which ACKs are sent back is also used to help determine the maximum speed that you can download data at, so it's important that ACKs get sent as soon as possible and don't get dropped in order to keep your downloads flowing fast. Also, repeatedly dropped ACKs can result in dropped connections, web page time-outs etc."

Monday 8 October 2012

sed with the capital E option on the Linux CLI

No, you are not crazy, sed on Linux has a secret, BSD compatible option, -E that is equivalent to -r.

Change default text editor for crontab to vim

sudo update-alternatives --config editor

Thursday 4 October 2012

ARP mechanism

  1. Computers Matterhorn and Washington are in an office
    1. connected to each other on the office local area network by 
      1. Ethernet cables and 
      2. network switches, 
    2. with no intervening gateways or routers
  2. Matterhorn wants to send a packet to Washington
    1. Through other means, it determines that Washington's IP address is 192.168.0.55. 
    2. In order to send the message, it also needs to know Washington's MAC address.
      1. First, Matterhorn uses a cached ARP table to look up 192.168.0.55 for any existing records of Washington's MAC address (00:eb:24:b2:05:ac). 
        1. If the MAC address is found,
          1. it sends the IP packet on the link layer to address 00:eb:24:b2:05:ac via the local network cabling. 
        2. If the cache did not produce a result for 192.168.0.55, 
          1. Matterhorn has to send a broadcast ARP message (destination FF:FF:FF:FF:FF:FF) requesting an answer for 192.168.0.55. 
          2. Washington responds with its MAC address (00:eb:24:b2:05:ac). 
            1. Washington may insert an entry for Matterhorn into its own ARP table for future use.
          3. The response information is cached in Matterhorn's ARP table and 
  3. the message can now be sent.

Tuesday 2 October 2012

No http on port 2812 for monit


FAIL!

set httpd port 2812 and use the address localhost
  allow localhost

  1. Problem
    1. monit doesn't listen on port 2812
      1. even though it is clearly in the config file 
  2. Possible issues
    1. Is there a "delay" set in your config?
      1. monit won't listen until this delay has passed
  3. Solution
    1. Wait, usually a minute by default, and check the port again
    2. Get rid of the delay in the config and restart monit

Interview questions: 2020-12

Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer  Networking Layer 1 vs Layer 4 haproxy u...