Personal Website and Spring Boot 🍃☕
This week I completed my web-counter project and made it fully functional. Now, it tracks page views on my personal website: https://hinst.github.io/ For the counter to work, JavaScript must be enabled in the user's browser. Bot visits that only download the HTML page are not counted. The data is stored in an SQLite database. I also implemented a spam protection mechanism:
- The server multiplies two random prime numbers
- JavaScript on the client side must determine which two numbers were used
Thus, API abuse is prevented. Deciphering the puzzle from the server's response requires some effort. The protection can be adjusted; increasing the number of factors will make the client-side decryption process much more time-consuming. Whether this level of protection is necessary for my small project is debatable 🤔💭 Nevertheless, I gained additional experience with Spring Boot while implementing this feature. https://github.com/hinst/web-counter
Kubernetes and Orange Pi 🐋🍊
I resolved two issues here.
First, I had the RAM log enabled on my Orange Pi. This feature is turned on by default, causing log loss in Kubernetes. I had to disable it. Logs will no longer be lost, but the memory card's load will increase.
Additionally, I learned that my Persistent Volume Claims (PVCs) were incorrectly configured. It seems each pair of PV and PVC must have a matching storageClassName. I previously overlooked this because, due to good fortune, my fewer PVs were automatically distributed to the correct PVCs 🤔🚿 A slightly confusing feature in my opinion.