This article explains how Spring Boot's request capacity is determined by Tomcat's configuration parameters, demonstrates the impact of min‑spare, max threads, max‑connections, and accept‑count through a small example, and discusses concurrency pitfalls caused by singleton beans.
This article explains how to replace Spring Boot's default embedded Tomcat with the high‑performance Undertow server, detailing Undertow's features, providing Maven dependency changes, showing configuration steps, and presenting benchmark results that compare QPS and memory usage, concluding that Undertow is preferable for high‑concurrency Java backend applications.
The article explains why deploying only Tomcat without Nginx is impractical due to DNS IP limits, scaling costs, lack of health checks, and static file handling, and demonstrates how Nginx provides load balancing, failover, virtual hosting, and reverse‑proxy capabilities with concrete configuration examples.
This guide explains how to tune Tomcat 8.5 by adjusting server.xml parameters such as maxThreads, acceptCount, maxConnections, and connectionTimeout, while also covering related Linux kernel settings, file‑descriptor limits, and JVM options to achieve optimal concurrency and response times.
This article explains the default Tomcat settings bundled with Spring Boot 2.7.10, details core parameters such as accept‑count, max‑connections, thread pool sizes, and timeouts, describes the internal Acceptor and Poller threads, provides configuration examples and testing results, and includes reference links.
This article explains the purpose of Java's parent delegation class‑loader mechanism, describes its three built‑in loaders, and details common scenarios—such as JNDI, JDBC, Tomcat, and OSGi—where developers intentionally break the delegation to achieve flexibility and isolation.
On October 27, 2023, a sudden surge in request volume and downstream latency caused the bfe‑customer‑application‑query‑svc to exhaust its Tomcat thread pool, triggering health‑check failures and pod restarts; a deep dive revealed that an ill‑designed custom executor and unchecked thread‑waiting calls created a bottleneck that amplified the outage.
The article explains why deploying only Tomcat without Nginx leads to scaling, cost, and reliability problems, and demonstrates how Nginx’s health‑check, failover, and virtual‑host features complement Tomcat to build a robust, production‑grade web architecture.
The article analyzes the limitations of deploying web services with Tomcat alone—such as DNS IP caps, scaling costs, lack of health checks, static file handling, and release downtime—and demonstrates how Nginx’s reverse‑proxy, health‑check, and virtual‑host features overcome these issues with concrete configuration examples.
This guide walks through setting up a complete CI/CD environment on three CentOS 7.6 machines—GitLab, Jenkins, and Tomcat—covering installation, configuration, plugin management, Maven integration, SonarQube scanning, and automated deployment of a Java web application.
This article explains how to replace the default embedded Tomcat container in Spring Boot with Undertow, outlines the configuration steps, compares their performance and memory usage through benchmark results, and concludes that Undertow offers superior throughput for high‑concurrency Java web applications.
This guide walks through importing a CentOS 7 virtual machine in VMware, configuring network settings (dynamic or static IP), resolving common issues, then installing and configuring JDK 1.8, MySQL 5.7, and Tomcat 8.5, and finally creating systemd services for automatic startup of Java applications.
This guide demonstrates how to leverage Maven resource filtering for automatic property expansion in Spring Boot 3.2.5, configure externalized settings via spring.main and system properties, customize configuration file locations, activate profiles, set parent containers, modify DispatcherServlet paths, enable Tomcat access logs, MBean registry, and generate build and Git metadata.
The article explains that SpringBoot’s request capacity is governed by Tomcat’s thread pool and connection settings, derives the formula max‑connections + accept‑count, demonstrates it with a small‑scale experiment, and discusses related concurrency pitfalls in singleton beans.
This article explains how SpringBoot defaults to an embedded Tomcat container, shows how to replace it with Undertow by adding the appropriate dependency, and compares the two servers' performance and memory consumption through benchmark results, concluding that Undertow is preferable for high‑concurrency Java backend applications.
This guide explains why Tomcat’s default settings are unsuitable for production, then walks through JVM memory tuning, thread‑pool adjustments, connector optimizations, and security hardening to dramatically improve stability and throughput on various server configurations.
This article explains how to optimize Tomcat by adjusting server.xml parameters such as maxThreads, acceptCount, maxConnections, and connectionTimeout, while also covering related Linux kernel settings, file descriptor limits, and JVM options to achieve balanced performance for both CPU‑bound and I/O‑bound workloads.
This article explains how to replace the default embedded Tomcat container in Spring Boot with Undertow, compares their performance and memory usage through load tests, and demonstrates why Undertow is a better choice for high‑concurrency Java web applications.
This article explains the default Tomcat settings bundled with Spring Boot 2.7.10, details core parameters such as connection queues, thread pools, keep‑alive limits, and timeouts, and demonstrates how to monitor and test these settings with code examples and network tools.
This article dissects Tomcat’s mature architecture, explaining its macro and micro design, startup flow, connector and container components, lifecycle management, class‑loader hierarchy, hot‑reload mechanism, and how developers can apply the demonstrated patterns such as composite, observer, template method, and strategy in real projects.
This article walks through an interview question about the maximum concurrent requests a default SpringBoot application can process, builds a minimal demo, examines Tomcat and Undertow thread‑pool configurations, and shows how container defaults and parameters like core size, max size, and queue length determine the real limit.
Passing a HttpServletRequest to a regular thread in Spring Boot causes Tomcat to recycle the request after the servlet returns, making parameters unavailable and yielding null values, so you must use the servlet async API (startAsync and complete) to keep the request alive.
This article explains multiple backend optimization methods for Spring Boot, including asynchronous execution with @Async and CompletableFuture, increasing embedded Tomcat connection limits, using @ComponentScan, switching to Undertow, applying BufferedWriter, employing DeferredResult, and intercepting async calls with AsyncHandlerInterceptor, accompanied by concrete code examples.
This tutorial walks through importing a CentOS7 virtual machine into VMware, configuring static or dynamic IP settings, installing JDK 1.8, setting up MySQL 5.7 with remote access, and deploying Tomcat 8.5 and a Spring Boot service for automatic startup, including common pitfalls and fixes.
This article explains the default Tomcat settings in Spring Boot 2.7.10, detailing connection queues, thread pool parameters, timeout configurations, and internal threading architecture, and provides practical examples and testing results for various concurrent connection scenarios.
This guide walks through migrating services from Alibaba Cloud to AWS by containerizing Tomcat and SpringBoot applications with Docker, covering environment checks, Dockerfile creation, image building, container deployment, troubleshooting, and best‑practice summaries for reliable production rollout.
This article explains the Java class loading mechanism, the parent‑delegation model, how it can be broken, and then details Tomcat’s custom classloader hierarchy—including CommonClassLoader, CatalinaClassLoader, SharedClassLoader, and WebappClassLoader—showing why Tomcat deviates from the standard delegation model.
This article explains why a Spring Boot application runs with the configured port when packaged as a JAR using the embedded Tomcat, but switches to Tomcat's default port and context path when deployed as a WAR, and provides step‑by‑step instructions to package and deploy both formats along with historical context and technical differences.
This article explores how many concurrent requests a SpringBoot application can process with default settings, demonstrating a hands‑on demo, analyzing Tomcat’s thread‑pool defaults, comparing Undertow behavior, and revealing how configuration parameters like core threads, max threads, queue size, and connection limits affect throughput.
Using only Tomcat for web services leads to DNS limits, scaling costs, lack of health checks, and no static file handling, so the article explains why Nginx is essential for load balancing, failover, and virtual‑host configuration, and provides practical Nginx examples.
This article details how a hidden 100 ms delay in a Spring Boot channel system was traced to Tomcat‑embed’s handling of Swagger‑UI resources, diagnosed with Arthas, and resolved by upgrading the embedded Tomcat version.
This article demonstrates how Spring Boot’s connectionTimeout setting influences server‑client connections, using three experiments—controller sleep, HttpURLConnection requests, and raw socket communication—to reveal that the timeout only terminates idle client connections, not the duration of request processing.
This article explains Tomcat’s embedded core thread architecture, detailing the roles of Acceptor, Poller, and worker threads, their interaction with TCP connection queues, and how network I/O and large responses are processed, supplemented with code excerpts and diagrams.
This article explains how Tomcat starts by running the startup script, invoking the BootStrap main method, initializing Catalina, loading configuration, and managing component lifecycles through the Lifecycle interface, while also detailing default implementations, endpoint types, and protocol handlers.
This article examines Spring Boot 2.7.10’s embedded Tomcat configuration, detailing default connection queue sizes, thread pool parameters, key Tomcat settings such as AcceptCount and MaxConnections, internal thread components, and practical testing results that reveal how connection limits affect client‑server handshakes.
This article explains the differences between JAR and WAR files, why Spring Boot runs with an embedded Tomcat when packaged as a JAR, how deployment changes when using an external Tomcat, and provides step‑by‑step instructions with Maven configurations to build Spring Boot applications as either JAR or WAR packages.
This article reviews Java’s default class loading mechanism, explains the parent‑delegation model, then details how Tomcat’s custom class loaders (Common, Catalina, Shared, Webapp, Jasper) intentionally deviate from that model to achieve isolation, versioning, and hot‑swap capabilities for web applications.
This article explores the interview question of how many concurrent requests a SpringBoot project can process by building a minimal demo, measuring Tomcat and Undertow thread pool limits, analyzing default configurations, and showing how container settings and annotations like @Async affect the actual request capacity.
This article explains how Spring Boot 2.4.12 configures error handling, from default HTML/JSON responses based on the Accept header to the internal auto‑configuration that registers custom error pages in the embedded Tomcat container using BeanPostProcessors and the BasicErrorController.
This guide compiles a comprehensive set of IntelliJ IDEA configurations and shortcuts—including SVN change indicators, multi‑project windows, Tomcat UTF‑8 fixes, import settings, compilation speed tweaks, global encoding, serialVersionUID generation, Maven/Tomcat setup, file exclusion, language injection, and quote wrapping—to streamline Java backend development.
This article reviews Java’s default class‑loading mechanism, explains the parent‑delegation model, discusses how it can be broken, and details Tomcat’s custom class‑loader architecture that intentionally deviates from the standard delegation to achieve web‑application isolation and hot‑swap capabilities.
This article walks through an interview question about the maximum concurrent requests a SpringBoot project can handle, builds a minimal demo, measures Tomcat and Undertow thread‑pool limits, explains the underlying thread‑pool mechanics, and offers practical tips for answering such questions in interviews.
This article explains the dangers of using the Linux kill -9 command on Spring Boot applications, illustrates data loss scenarios, and provides multiple graceful shutdown methods—including SIGTERM, Spring's ConfigurableApplicationContext, Actuator endpoints, and custom Tomcat shutdown configurations—complete with code examples and best‑practice tips.
This article provides a comprehensive collection of IntelliJ IDEA configuration tips covering SVN change visibility, opening projects in new windows, fixing Tomcat Chinese character encoding, adjusting import display, speeding up compilation, setting global file encodings, generating serialVersionUID, customizing code templates, and various other IDE shortcuts and settings.
This article explains how to replace SpringBoot's default embedded Tomcat with Undertow, details the configuration steps, compares their performance and memory usage through benchmark results, and argues that Undertow offers superior throughput for high‑concurrency Java web applications.
This article explains how to replace SpringBoot's default embedded Tomcat with the high‑performance Undertow container, compares their architectures, presents benchmark results on QPS and memory usage, and shows why Undertow is the better choice for high‑concurrency Java web applications.
This article explains how to replace Spring Boot's default embedded Tomcat with Undertow, details the configuration steps, compares their performance and memory usage through benchmark results, and concludes that Undertow offers superior efficiency for high‑concurrency Java backend applications.
This article explains the motivations for moving a Java 8 project to JDK 11, compares JDK 11 and JDK 17, outlines JDK 11’s key features, details Tomcat 8.5 differences, provides step‑by‑step migration instructions, and shares troubleshooting tips for common upgrade issues.
This article explains how to replace Spring Boot's default embedded Tomcat with the high‑performance Undertow server, details the necessary Maven dependencies and configuration steps, and presents benchmark results showing Undertow's superior throughput and lower memory usage under high‑concurrency workloads.
This article explains Tomcat's component architecture, describes the three critical parameters (maxThreads, maxConnections, acceptCount) that affect request handling, and provides practical tuning recommendations to improve backend performance without additional hardware costs.
This guide explains why Nginx proxying to an HTTP backend causes the browser URL to change, how to fix the redirect by using HTTPS, and how to achieve session consistency across multiple Tomcat instances by integrating Memcached for shared session storage.
This article explains the servlet specification, core servlet APIs, and how Tomcat implements them, detailing the roles of ServletConfig, ServletContext, ServletRequest, and ServletResponse, and walks through Tomcat’s internal architecture, including server.xml configuration, component hierarchy, and the interaction of Server, Service, Engine, Host, and Context.
The article details how a midnight interface timeout in Vivo’s e‑commerce activity system was traced to a logging bottleneck: a synchronous Log4j call blocked all threads while a cron‑driven log‑rotation script copied a 2.6 GB file, and the issue was resolved by switching to asynchronous logging with a non‑blocking appender.
This article walks through the step‑by‑step investigation of an unexpected ~100 ms latency in a Spring Boot channel service, using network checks, curl timing, and the Arthas Java diagnostic tool to pinpoint a Tomcat‑embed bug caused by Swagger jars, and then shows how upgrading Tomcat or Spring Boot resolves the problem.
This article explains how Spring Boot relies on Tomcat's thread and connection settings, demonstrates how to configure these parameters, runs a practical test to observe request handling limits, and discusses the resulting concurrency problems and their root causes.
This article explains why an Nginx reverse‑proxy configuration that proxies HTTPS requests to a backend server causes the browser URL to change, how to fix the redirect by using HTTPS in the proxy, and how to achieve session consistency across multiple Tomcat instances by deploying Memcached with Docker and adjusting Tomcat’s session manager.
This article explains why a Spring Boot application behaves differently when run as a JAR versus deployed as a WAR, outlines the historical context of servlet containers, compares JAR and WAR formats, and provides step‑by‑step Maven commands and pom.xml modifications for packaging both types.
This article explains why and how to replace SpringBoot's default embedded Tomcat with the high‑performance Undertow server, comparing their throughput and memory usage and showing the necessary Maven dependency and configuration steps for better scalability in Java web applications.
This article provides a comprehensive guide to implementing asynchronous processing in Spring Boot, covering annotation‑based @Async, CompletableFuture patterns, WebAsyncTask, DeferredResult, custom thread pools, Tomcat tuning, component scanning, and switching to Undertow, with complete code examples and configuration details.
To prevent repeated logins in distributed microservice systems, this article explains four session‑sharing solutions—Nginx ip_hash load balancing, Tomcat session replication, Redis‑based session caching, and cookie‑based storage—detailing their principles, configuration examples, and advantages and disadvantages.
Learn how systemd replaces traditional init on modern Linux, its key features, command syntax, unit file structure, and step-by-step hands-on examples that show how to create and control systemd services for Nginx, Tomcat, and custom Java JAR applications using systemctl.
This guide explains what systemd is, its key advantages over traditional init, the basic systemctl syntax, how unit files are structured, and provides step‑by‑step examples for creating systemd services to manage Nginx, Tomcat, and a custom Java JAR application on CentOS 7 and similar Linux distributions.
A government information system suffered a week of instability, including service deadlocks, Tomcat memory overflows, and load‑balancing failures, prompting a deep forensic analysis that uncovered database lock‑ups, faulty front‑end loops, inadequate monitoring, and misconfigured logging, leading to concrete remediation steps and lessons for future reliability.
This guide walks beginners through the complete process of publishing a website online, covering domain registration and ICP filing, DNS configuration, selecting and configuring a cloud server, installing Java and Tomcat, and finally uploading the site source files via FTP.
This article explains Tomcat's component architecture, describes the request‑processing flow, and provides practical guidance on tuning the three critical parameters—maxThreads, maxConnections, and acceptCount—along with additional settings to improve backend service performance without additional hardware.
This article explores Tomcat’s mature architecture, detailing its macro and micro design, the roles of connectors, containers, lifecycle management, class loaders, and the design patterns that enable modularity, extensibility, and hot‑reloading, while offering practical tips for reading and applying its source code.
This article presents seven practical Spring Boot performance optimization methods—including asynchronous execution, increasing embedded Tomcat connection limits, component scanning, switching to Undertow, using BufferedWriter, DeferredResult, and AsyncHandlerInterceptor—each illustrated with code samples and explanations for improving Java backend applications.
This article details how a hidden 100 ms latency in a Spring Boot channel service was identified and resolved by tracing request flow, using the Arthas Java diagnostic tool, and ultimately fixing a Tomcat‑embed bug caused by Swagger‑ui resources.
This article explains Tomcat’s internal component architecture, walks through the request‑processing flow, and details three crucial configuration parameters—maxThreads, maxConnections, and acceptCount—offering practical formulas and tuning guidelines to improve throughput without adding hardware.
Passing an HttpServletRequest into an asynchronous thread in Spring Boot can cause mysterious parameter loss and request‑recycling bugs, because Tomcat reuses request objects; the proper solution is to employ the servlet's startAsync and AsyncContext.complete methods for safe async processing.
This article explains how to replace Spring Boot's default embedded Tomcat with Undertow, outlines the configuration steps, compares their performance and memory usage through benchmark results, and concludes that Undertow offers superior throughput and lower resource consumption for high‑concurrency Java web applications.
This article explains multiple Spring Boot asynchronous execution techniques—such as @Async, CompletableFuture, WebAsyncTask, DeferredResult, and AsyncHandlerInterceptor—provides complete Java code examples, and discusses performance optimizations like increasing Tomcat connection limits, switching to Undertow, using ComponentScan, and buffered I/O.
This article explains how to replace Spring Boot's default embedded Tomcat with the high‑performance Undertow container, details the configuration steps, and presents benchmark comparisons showing Undertow’s superior throughput and lower memory usage under high‑concurrency workloads.
This article explains how to replace SpringBoot's default embedded Tomcat with Undertow, compares their performance and memory usage through benchmark tests, and shows why Undertow is a superior choice for high‑concurrency Java web applications.
This article explains how to replace the default embedded Tomcat container in SpringBoot with Undertow, compares their performance and memory usage through benchmark tests, and recommends Undertow for high‑concurrency Java web applications.
This article explains how SpringBoot uses Tomcat by default, demonstrates how to replace it with the high‑performance Undertow container, compares their features, and presents benchmark results showing Undertow’s superior throughput and lower memory consumption for high‑concurrency Java web applications.
The article details a step‑by‑step investigation of a form‑submission cross‑origin error in a front‑back separated system, tracing the HTTP request flow through DNS, Nginx, Tomcat, and finally identifying a WAF XSS rule that blocked a specific moduleExport field, and explains how the issue was resolved by adjusting the WAF configuration.
This article provides a comprehensive tutorial on implementing Single Sign‑On using the open‑source CAS solution, covering the concepts of SSO and CAS, required development environment, server‑side deployment, client integration with Spring Boot, configuration details, and a complete end‑to‑end testing workflow.
Explore Tomcat’s mature architecture, from its connector and container components to class loader hierarchy, revealing how design patterns like composite, observer, and template method shape its modular, extensible system and offering practical insights for mastering Java web server internals.
This article provides a comprehensive technical overview of Apache Tomcat, covering its role as a Java EE servlet container, internal components such as Server, Service, Connector, and Container, lifecycle management, startup sequence, deployment configuration, JSP engine, connector types, NIO processing, Comet, and asynchronous servlet handling.
This guide introduces systemd, explains its key features and unit file syntax, and provides three hands‑on examples showing how to manage Nginx, Tomcat, and a custom JAR application with systemd on modern Linux distributions.
This article explains the newly disclosed Spring Framework remote code execution flaw affecting JDK 9+ Spring MVC/WebFlux applications deployed as WARs on Apache Tomcat, outlines the affected conditions, current patch status, and provides code‑level workarounds for safe remediation.
This article provides a comprehensive overview of Apache Tomcat, covering its role as a Java web server, the internal components such as Server, Service, Connector, and Container, the lifecycle management, startup process, connector types, NIO handling, Comet support, and asynchronous servlet processing.
This article provides a comprehensive overview of Tomcat, covering its role as a Java web server, internal components such as Server, Service, Connector and Container, lifecycle management, deployment methods, connector implementations (BIO, NIO, APR), Comet support, and asynchronous servlet processing, with code examples for thread handling.
The article details how a SpringBoot image‑upload service suffered timeouts due to excessive Full GC and thread‑blockage, and explains the investigation, thread‑pool tuning, and the adoption of asynchronous Servlet (with Tomcat and Spring MVC implementations) to isolate long‑running URL‑download tasks while returning results synchronously.
This article explains the complete Java class loading lifecycle—including loading, verification, preparation, resolution, initialization, usage, and unloading—details the seven scenarios that trigger active loading, illustrates the parent delegation model, and provides code examples for custom and Tomcat class loaders.
This article explains how a senior architect implements a lightweight Tomcat clone called MyTomcat, covering its socket service, request dispatching, request/response encapsulation, servlet mapping, and the overall processing flow with code examples and diagrams.
This article provides a comprehensive overview of Apache Tomcat, covering its role as a Java EE web server, core components such as Server, Service, Connector, and Container, the servlet and JSP lifecycles, configuration details, connector types, NIO processing, Comet, and asynchronous servlet handling.
Tomcat is an open‑source Java web server that implements core Java EE specifications such as Servlets and JSP, and its architecture includes containers, connectors, pipelines, valves, and lifecycle management, with detailed explanations of component roles, startup process, deployment, NIO handling, Comet, and asynchronous servlet support.
This article provides a detailed overview of Tomcat’s backend architecture, explaining its core components such as the server, service, connector, lifecycle management, protocol handler, endpoint, processor, adapter, and container hierarchy, and includes code examples illustrating the request‑response flow.
A Spring Boot channel service suffered an unexplained 100 ms extra latency, which was traced using Arthas to Tomcat’s handling of META‑INF resources from Swagger’s JAR, and the issue was resolved by upgrading the embedded Tomcat version.
This article explains the structure and principles of Tomcat connectors, describes how they handle network IO through components like Endpoint, Processor, and Adapter, and compares the synchronous NioEndpoint with the asynchronous Nio2Endpoint using various IO models and multithreading techniques.
This article reviews Java’s default class loading mechanism and parent‑delegation model, explains how the model can be broken, and details Tomcat’s custom classloader architecture—including Common, Catalina, Shared, Webapp, and JSP loaders—showing why Tomcat deviates from the standard delegation hierarchy.
This guide demonstrates how to create a Docker image for Apache Tomcat on CentOS by preparing a Dockerfile that installs JDK, adds Tomcat binaries, sets an ENTRYPOINT to start the server, and exposes port 8080 for containerized deployment.
This guide explains how to install JRebel, a hot‑deployment tool for Java web applications, using either Tomcat startup parameters or the IntelliJ IDEA plugin, and details the necessary VM options, deployment settings, and Maven/Gradle integration to achieve instant code updates without restarting the server.
This article examines the importance of resource isolation in distributed systems, covering thread, process, cluster, data‑read/write, static, and crawler isolation, and illustrates practical implementations with Netty, Dubbo, Tomcat, and Hystrix, including code snippets and configuration tips.
This guide explains what Servlets and the Servlet specification are, outlines Tomcat's architecture and core components, and walks through the detailed HTTP request processing flow, providing code examples and diagrams for Java backend developers.
This article explains how Spring Boot registers custom error pages with its embedded Tomcat container, covering default HTML/JSON error responses, the underlying auto‑configuration classes, BeanPostProcessor registration, and the BasicErrorController that serves the default /error endpoint.
Tomcat is an open‑source Java web server that implements core Java EE specifications such as Servlets and JSPs, and its architecture comprises containers like Server, Service, Connector, and Catalina, each with components (Engine, Host, Context, Wrapper) that manage lifecycle stages, request processing pipelines, valves, connectors (BIO/NIO/APR), JSP compilation, and asynchronous servlet handling.
This step‑by‑step guide shows how to set up Docker on CentOS 7, install Docker Compose, pull a Tomcat image, create a Spring Boot project, package it, and run it inside a Docker container using both Tomcat and OpenJDK images.