Devculi Blog

Java 11 HTTPClient Timeout Issue

Symptom A record is locked in the database and we receive a slow query notification from the database management team SQL: The query has almost nothing to optimize, but operations cannot be performed on this record Problem Thread dump trên server look like this: CompletableFuture.get() is called without timeout while Openjdk’s HttpClient having a bug […]

Posted in: Uncategorized

Nginx + Certbot

Step: You can use Certbot to obtain and install SSL/TLS certificates from Let’s Encrypt for your Nginx server. Here are the steps to use Certbot with Nginx on Ubuntu: Verify Nginx is running: lua Open the firewall to allow HTTP and HTTPS traffic: python Run Certbot with Nginx plugin: css That’s it! Your Nginx server […]

Posted in: Uncategorized

Centos 8 Hugepage

https://www.golinuxcloud.com/configure-hugepages-vm-nr-hugepages-red-hat-7/#Configure_hugepages_in_Red_HatCentOS_78 Create hugepage volume for used inside docker containers Force application using hugepage:

Posted in: Uncategorized

[Security] Secure SSH

Option 1: Disable password-based authentication and use SSH keys Option 2: Change default SSH port Option 3: Use fail2ban to protect against brute force attacks Option 4: Use Two-Factor Authentication (2FA)

Posted in: Uncategorized

Huge pages and Java

Enable huge pages for docker Step 1: Create external volumes to used by multiple containers Step 2: Used in docker-compose.yml Example: Step 4: Start your docker-compose and recheck to make sure hugepages under used References https://rigtorp.se/hugepages/ https://kstefanj.github.io/2021/05/19/large-pages-and-java.html https://mpolednik.github.io/2017/06/20/hugepages-and-virtualization/

Secure selenium gird with basic authentication and ssl verification

Step 1: Create docker-compose with caddy basic auth Step 2: Config caddy Add caddy forder to root folder. Create file caddy/Caddyfile with below content Create .env file to customize ADMIN_USER, ADMIN_PASSWORD, ADMIN_PASSWORD_HASH Note: To hash your own password, use this commandline Step 3: Test your grid Java code Now we have a secure selenium grid […]