Posts

Maximizing Productivity and Avoiding Pitfalls: A Guide to Tech Blogging While Balancing a Full-time Job

Image
As a software engineer, you're already familiar with the fast-paced demands of the tech industry. However, you may also have a desire to share your expertise, build your personal brand, and even earn some extra income through tech blogging. In this post, we'll explore strategies to help you become a productive tech blogger, even with a busy schedule and challenges such as writing skills and content ideas. 1. Define Your Niche: As a software engineer, you have valuable expertise to share. Defin   ...

Navigating the Nuances of React: Managing Event Listeners in Conditional Components

Image
In the dynamic world of React development, managing event listeners within conditional components can be a subtle yet crucial aspect that demands attention. Often, developers encounter unexpected behaviors when event listeners persist even after a component is hidden. In this post, we'll delve into this challenge and propose effective solutions to ensure seamless functionality in your React applications. Understanding the Issue Consider a scenario where a React component adds a key event liste   ...

Debugging Deadlock Issues with Thread Dump Analysis Using kill -3 Command

Image
Introduction: Deadlocks are a common issue in multi-threaded applications, where two or more threads are blocked indefinitely, waiting for each other to release resources. Identifying and resolving deadlocks is crucial for maintaining the stability and performance of your application. In this post, we'll explore how to use the kill -3 command to generate thread dumps and analyze them to diagnose and troubleshoot deadlock issues effectively. We'll also discuss additional tips for handling threads   ...

Bypassing Client Authentication for Specific Endpoints in Spring Boot with mTLS(2 way SSL) enabled

Image
In Spring Boot applications secured with SSL, enabling client authentication (configured as server.ssl.client-auth: need) typically requires that all incoming requests provide a valid client certificate. However, there are scenarios where certain endpoints require bypassing this client authentication while maintaining SSL security. For instance, consider a SOAP service where the operations exposed necessitate 2-way SSL, but the WSDL endpoints do not require client certificates and may pose usabi   ...

Implementing A/B Routing with Spring Cloud Gateway

Image
In modern microservices architectures, routing requests based on specific criteria is a common requirement. In this post, we'll explore how to use Spring Cloud Gateway to implement A/B routing for different customers based on their customer IDs. We'll achieve this by implementing a custom filter in Spring Cloud Gateway to check the customer ID and route them to the appropriate service based on defined criteria. Custom Filter Implementation: import org.springframework.cloud.gateway.filter.Gate   ...