How Do You Distribute Traffic to Web Servers without a Load Balancer?

Problem scenario
You want to direct traffic to web servers (e.g., duplicative, stateless web servers). You want to do it without a load balancer (as they can become a bottleneck). What technologies could you use?

Possible Solution #1
Use Round Robin DNS. This DNS system can send traffic to a list of web servers. See more on cloudflare.com.

Possible Solution #2
Use Anycast.

In anycast, a collection of servers share the same IP address and send data from a source computer to the server that is topographically the closest.

https://www.imperva.com/blog/how-anycast-works/

Anycast is one-to-one routing mechanism (unlike a broadcast system).

[W]ith Anycast there are multiple possible destinations and the network itself picks the route that is most preferential.

https://blog.cloudflare.com/cloudflares-architecture-eliminating-single-p/

How Do You Troubleshoot the Python Error “(-5:Bad argument) CAP_IMAGES: can’t find starting number”?

Problem scenario
You installed cv2 with "pip3 install opencv-python"

You run a Python program, but you get this error:

[ERROR:0] global /tmp/pip-req-build-afu9cjzs/opencv/modules/videoio/src/cap.cpp (160) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.3) /tmp/pip-req-build-afu9cjzs/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): https://www.youtube.com/watch?v=abcd1234 in function 'icvExtractPattern'

What should you do?

Possible Solution
The video file is not there. Check your code and verify that the uncorrupted video file is in the location your program thinks exists (the directory path and name).

How Do You Troubleshoot “Your python3 install is corrupted. Please fix the ‘/usr/bin/python3’ symlink.”?

Problem scenario
You run this command:

sudo do-release-upgrade

But you see this error:

"Your python3 install is corrupted. Please fix the '/usr/bin/python3' symlink."

What should you do?

Solution
Run this command:

tail -n 20 /var/log/dist-upgrade/main.log

Do you see a message like this?

2022-03-18 19:36:59,240 DEBUG python symlink points to: 'python3.5', but expected is 'python2.7' or '/usr/bin/python2.7'

If so, temporarily backup your python3.5 or python3.* file. Make a note of the location of this backed up file. Next, run this command:

sudo find / -name python2.7

Copy that file into /usr/bin/.

sudo mv -i /usr/bin/python /usr/bin/bak.python.bak
sudo ln -s /usr/bin/python2.7 /usr/bin/python

That may fix the problem. Try the original operation again [with a Python 2.x version].

How Do You Troubleshoot RDP Not Working?

Problem scenario
RDP is not allowing you to log into a Windows Server. What should you do?

Possible Solutions (that can be followed in random order)

  1. Is port 3389 blocked? Are you using iptables or a public cloud? Check egress ports from the client and ingress ports on the Windows server. You can use PowerShell or nmap to test port 3389.
  2. Are Remote Desktop Services running on the server?
  3. Can you make sure the Domain Controller is working correctly with the Windows server?
  4. Do you get a vague "internal error" when it fails. You may have misconfigured Network Level Authentication (NLA). Can you temporarily disable NLA on the Windows server? See this Microsoft article for further information.
  5. Can you use PowerShell or some other method to log in? Maybe your credentials are not working at all.
  6. Does the RDP client work with other Windows machines? If not, can you use a new RDP client? There are different clients for Windows and Linux.
  7. See this Microsoft article on troubleshooting RDP.

How Do You Find Out what Operating System your Linux Server is Running?

Problem scenario
You want to know the distribution and version of your Linux OS. How do you find out without using "cat /etc/*-release"?

Solution
Install Pulumi (it is quick and light), then run a command. Run these three commands:

curl -fsSL https://get.pulumi.com | sh
source ~/.bashrc
pulumi about

The output will tell you what OS you have and its version.

Quantitative Analysis Can Drive Investor Psychology

Canola oil prices got to $1,000 per ounce for a very short amount of time (per tradingeconomics.com).

Lumber prices go to $1,500 per board foot for a very short amount of time (per tradingeconomics.com).

Palladium prices got to $3,000 per ounce for a very short amount of time (per tradingeconomics.com).

Arabic numbers and specific values can make buyers retreat from a given asset. Clearly canola oil, lumber, and palladium prices were driven by excessive exuberance without support to go beyond an neat Arabic number.

If you want to read a book that delves into investor psychology and the problems of reading about businesses and selecting one that will perform well, read The Halo Effect. You may also want to read The Black Swan: The Impact of the Highly Improbable by Taleb, Blink by Malcolm Gladwell, and Thinking Fast and Slow by Daniel Kahneman.

Can an Airplane Crash if a Passenger Fails to Use Airplane Mode on a Flight?

Question
What could happen if your use your cell phone as normal on a plane? Would the pilots be incapable of communicating with air traffic control -- causing the plane to crash?

Answer
While we do not recommend violating the policies of a plane, one source says that interference with the pilot's communication system has not yet led to a crash.

The answer is not clear. We recommend using devices in airplane mode or turning them off before and during a flight.