This article explains how to build a lightweight Tomcat-inspired web server called MyTomcat, covering its socket service, request dispatching, HTTP request/response encapsulation, servlet mapping, and demonstrates the complete project structure with illustrative diagrams and code snippets.
This article explains the JVM and Tomcat class‑loading mechanisms, describes the parent‑delegation model, outlines the specific loaders Tomcat creates at startup, and shows why classes compiled from a project's src folder are preferred over those packaged in JARs.
This article provides a detailed Jenkins migration guide, covering environment preparation, Tomcat configuration, permission settings, script adjustments, data copying, and troubleshooting tips to ensure a smooth transition to a new production server.
This article explains Tomcat's modular top‑level architecture, detailing how a single Server contains multiple Services, each Service pairs a Connector with a Container, and how these components interact through server.xml configuration, request handling pipelines, and Valve chains.
This guide walks through planning server and software environments, installing and configuring keepalived on Red Hat Enterprise Linux 5, creating master‑backup VRRP instances, integrating a Tomcat health‑check script, monitoring logs, testing failover, and troubleshooting common errors.
This article explains Tomcat’s overall architecture, detailing the relationships among Server, Service, Connector, and Container, and describes how requests flow through ProtocolHandlers, Pipelines, and Valves to reach servlets and return responses.
The article shares three detailed production incidents—an Oracle overload, a blockchain media service overload, and a 502 failure in an Nginx‑Tomcat rental app—explaining how the author diagnosed, mitigated, and permanently resolved each problem, and distilling key operational lessons.
This guide walks through planning the server and software environment, installing and configuring keepalived, setting up master‑backup VRRP instances, monitoring logs, handling failover, checking virtual IPs, troubleshooting common errors, and adding a Tomcat service script for high‑availability Linux deployments.
This guide shows how to change a Spring Boot project’s packaging to WAR, remove the embedded Tomcat, add the servlet‑api dependency, create a servlet initializer, build the WAR with Maven, and deploy it to an external Tomcat server for verification.
This article explains the principles of the Facade, Observer, Command, and Chain of Responsibility design patterns, illustrates how Tomcat implements each with class diagrams and code snippets, and shows how these patterns help organize subsystems, manage events, delegate actions, and streamline request processing in a Java server.
This article explores Tomcat’s modular design, detailing the roles of Service, Connector, Container, Server, and Lifecycle interfaces, and illustrates how requests flow through the servlet engine with code examples and component diagrams.
This article explains why rate limiting is essential for flash‑sale (seckill) systems, compares token‑bucket and leaky‑bucket algorithms, and provides concrete Tomcat, Nginx, OpenResty, and Guava configurations along with code snippets and load‑testing results to help engineers implement robust throttling.
This article explains why rate limiting is essential for flash‑sale (seckill) services, compares token‑bucket and leaky‑bucket algorithms, and provides practical configuration examples for Tomcat, Nginx, and OpenResty, along with testing methods and code snippets.
This article explains why rate limiting is essential for large‑scale flash‑sale (seckill) services, introduces token‑bucket and leaky‑bucket algorithms, and demonstrates practical implementations using Tomcat thread pools, Nginx, OpenResty, and Guava RateLimiter together with stress‑testing commands.
This article explains why high‑traffic scenarios like flash‑sale systems need rate limiting, compares token‑bucket and leaky‑bucket algorithms, and shows practical configurations for Tomcat, Nginx, and OpenResty to protect APIs and ensure system stability.
This tutorial walks through setting up Docker on an Ubuntu VM, configuring user permissions, pulling a tutorial image, installing SSH, committing the container, and finally deploying Tomcat inside the container with port mappings, providing a complete hands‑on example of container‑based PAAS.
This article outlines the complete set of front‑end, back‑end, database, server, and deployment technologies and best‑practice knowledge a developer needs to build and run a simple yet functional Java Web application, providing a clear big‑picture roadmap for beginners.
This article explains the Java Servlet lifecycle—including loading, initialization, request handling, multithreading considerations, and destruction—detailing how Tomcat manages servlets, the role of init(), service(), and destroy() methods, and best practices for resource management and thread safety.
This article analyzes common problems with testing environments in fast‑iterating internet companies, compares several deployment strategies, and presents a comprehensive environment management platform that automates resource allocation, service configuration, and host mapping to improve efficiency, stability, and resource utilization.
This step‑by‑step tutorial shows how to install Tomcat, add Jenkins inside Tomcat, and set up JDK on macOS, covering environment preparation, required downloads, configuration of environment variables, command‑line startup and shutdown, and port conflict resolution.
This article explains Tomcat's NIO architecture, covering the I/O multiplexing model, Tomcat's support for various I/O models, NioEndpoint component relationships, step‑by‑step source‑code analysis, performance considerations, and practical configuration tips for optimizing high‑concurrency Java servers.
This article shares a Linux operations engineer’s interview experience, presenting seven common interview questions—self‑introduction, gray‑release implementation, MongoDB deployment, Jenkins‑based release and rollback, Tomcat work modes, monitoring solutions, and data backup—along with concise, practical answers and preparation tips.
This article explains the evolution of Java application servers, the inner workings of servlet containers, and provides a detailed walkthrough of Tomcat’s components, request handling flow, and key performance‑tuning considerations for modern backend development.
This guide explains how to package a JavaWeb application into a WAR file, describes Tomcat’s architecture and connectors, introduces symmetric and asymmetric encryption concepts, and shows how to generate a self‑signed certificate and configure an HTTPS connector in Tomcat.
This tutorial explains how to modify Tomcat's server port, map virtual directories using various methods, configure virtual hosts, register domain names on Windows, and outlines the browser‑server interaction process and the standard structure of a JavaWeb application.
This article breaks down Tomcat’s modular architecture, explaining how a single Server contains multiple Services, each pairing Connectors and a Container, and details the inner workings of Connectors, Containers, and their pipeline‑Valve processing to help developers master Tomcat internals.
This article explains the basic concepts of static and dynamic web resources, describes common web servers and development technologies, and provides a step‑by‑step guide to installing, configuring, and troubleshooting Tomcat for JavaWeb applications.
This article provides a comprehensive technical guide to Tomcat, covering its kernel implementation principles, server models, distributed clustering strategies, production deployment parameters, JVM tuning, request processing flow, servlet mechanisms, filter chains, Comet and WebSocket modes, as well as performance monitoring and optimization techniques.
This tutorial walks through setting up a Spring MVC environment with Eclipse, Tomcat, and JDK, importing required JARs, configuring web.xml and springmvc.xml, writing a HelloWorld controller, creating JSP views, and handling common issues such as static resource mapping and server integration.
This article explains why creating a database connection for each request is inefficient, introduces the concept and configuration of connection pools, provides a custom Java DataSource implementation, and demonstrates the use of popular open‑source pools such as DBCP, C3P0, and Tomcat JNDI with complete code examples.
This article analyzes a JVM deadlock issue encountered in a Tomcat-based application, detailing the problem's cause, analysis using jstack, and the solution involving ClassLoader isolation and ParallelCapable registration.
This article explains how to measure a system's load capacity, identifies key factors such as bandwidth, hardware, OS and application configurations, and provides practical optimization techniques for Linux, Tomcat, Nginx, MySQL, and Redis to handle high concurrency efficiently.
This article explains how to measure system load capacity using requests per second, identifies key factors such as bandwidth, hardware, Linux limits, and application server configurations, and provides practical optimization tips for Nginx, Tomcat, MySQL, Redis, and load‑balancing architectures.
A detailed case study reveals how an out‑of‑memory (OOM) situation on a Linux server caused Tomcat to crash during load testing, explains the kernel's OOM killer behavior, and provides practical solutions such as enabling swap and tuning Apache limits.
After leaving Baidu in 2015, the author recounts nearly two years of evolving a startup’s backend architecture—from a single‑server Tomcat setup to multi‑node clusters with Nginx reverse proxy, database sharding, caching, session sharing, and service‑oriented design—highlighting challenges, optimizations, and lessons learned.
This article examines how Tomcat connector settings such as acceptCount, maxConnections, maxThreads, executor, and protocol affect concurrency and throughput in asynchronous servlet environments, and demonstrates tuning steps that significantly improve performance.
This step‑by‑step guide shows how to set up two Tomcat instances, configure Nginx as a reverse‑proxy load balancer, and use Redis to share session data, solving session‑loss issues in a simple load‑balanced environment.
This article outlines the rationale for adopting Node.js in the 京友邦 project, compares two deployment architectures—separate Node and Tomcat services versus co‑locating them in a single Docker container—and provides detailed step‑by‑step instructions for packaging, scripting, Nginx configuration, and monitoring to achieve a successful rollout.
This article explains the purpose and generation of Tomcat's default log files—catalina.out, catalina.{yyyy‑MM‑dd}.log, and localhost.{yyyy‑MM‑dd}.log—how they are configured via logging.properties and server.xml, and which types of messages appear in each file to aid troubleshooting.
This step‑by‑step guide shows how to prepare two Tomcat servers, create a simple web project, configure Nginx as a reverse‑proxy load balancer with various strategies, start the services on Windows, and verify that requests are distributed across the Tomcat instances.
After a senior Java director’s Tomcat failed to start due to a mysterious port conflict, I used Windows commands to identify an iQIYI process, killed it, and restored service, then explained Linux file timestamps (atime, mtime, ctime) and demonstrated md5sum options for reliable integrity checks.
This tutorial walks you through purchasing an Alibaba Cloud server, configuring the Linux environment, installing JDK, Tomcat, and MySQL, setting up environment variables, deploying a WAR file, and adjusting MySQL character settings, all with clear screenshots and command examples.
This tutorial explains how to install Docker and MyEclipse, create a Dockerfile for a Tomcat 7 image, build and run the container, deploy a Spring Shopping Cart example inside it, and use MyEclipse features to manage and test the Dockerized web application.
This article explains the fundamentals of the HTTPS protocol, details the SSL/TLS cryptographic components and handshake process, and provides a step‑by‑step guide for generating keystores, configuring Tomcat, modifying an Android client, and troubleshooting common issues during secure communication.
The article analyzes a production incident where a Java web application using Apollo Config Center triggered "Too many open files" and NoClassDefFoundError errors after a configuration push, tracing the root cause to low OS file‑descriptor limits and Tomcat's class‑loading behavior.
This article analyzes a production incident where a Java web application using Apollo configuration center encountered "Too many open files" errors, detailing the fault symptoms, root cause analysis involving Tomcat's classloader and file‑descriptor limits, and presenting remediation and preventive measures.
This article explains how to identify and resolve intermittent high CPU usage in Java/Tomcat services by analyzing thread stacks with jstack, examining GC behavior with Jstat, and using Jmap for memory inspection, providing step‑by‑step commands and practical tips for ops engineers.
This article explains how to use Nginx's various load‑balancing strategies together with Tomcat clustering and session‑sharing techniques to build a resilient, high‑availability web service, covering both simple static‑page scenarios and session‑dependent applications.
This article provides a comprehensive overview of Apache Tomcat's modular architecture, detailing the roles and interactions of Connectors, Containers, Services, Servers, and the Lifecycle interface, while illustrating key implementation classes and code snippets that govern request handling and component management.
This guide explains how to simplify and accelerate Tomcat web application migration by separating static binaries from external configurations, using Docker containers or Juju packages, applying layered configuration, managing persistent data with volumes, and automating deployment, scaling, and rollback operations.
The article explains how to achieve simple, fast, and lossless application migration by separating immutable binaries from external configuration, and how Docker containers and layered images can streamline deployment, scaling, configuration management, and persistent data handling.
This tutorial walks through configuring Redis for Tomcat session sharing on Windows, covering environment setup, Gradle compilation of the tomcat-redis-session-manager plugin, jar deployment, context.xml configuration, and verification of shared session IDs across multiple Tomcat instances.
This guide explains key metrics, influencing factors, and practical tuning steps—including bandwidth, hardware, OS limits, TCP parameters, and server configurations—to assess and improve a backend system's maximum request handling capacity under high concurrency.
This article explains how to measure a system's load capacity, identifies key factors such as bandwidth, hardware, and OS settings, and provides practical optimization techniques for Linux, Nginx, Tomcat, and databases to achieve higher concurrency and better performance.
This tutorial walks you through creating a Docker‑based backend for a WeChat public account, covering project structure, Nginx and Tomcat configuration, Maven build, Dockerfile creation, and deployment on DaoCloud with continuous integration.
This guide explains how to achieve high‑availability Tomcat session sharing in a clustered environment by installing and configuring MSM (Memcached Session Manager) with Memcached, setting up Nginx as a load balancer, and demonstrating failover handling for both Tomcat and Memcached nodes.
This article explains the origins and standards of WebSocket, compares its full‑duplex communication model with traditional HTTP, details server‑side and client‑side APIs with Java and JavaScript code examples, and presents a practical case study of real‑time device tracking using Tomcat.
This guide compiles essential Linux kernel sysctl settings, Nginx performance tweaks, MySQL configuration for 8 GB RAM, Tomcat connector optimizations, and hardware load monitoring commands to help you fine‑tune a production server for maximum throughput and stability.
This article analyzes the core principles and components of thread pools, explains why they are essential for performance and flow control, and compares the concrete implementations in JDK, Jetty 6, Jetty 8, and Tomcat, providing guidance for developers who wish to use or customize thread pools.
This guide explains why and how to turn off Tomcat's TLD scanning during startup, shows the necessary context.xml changes, addresses a Tomcat 6 pitfall with a custom JarScanner workaround, and notes that Tomcat 7 handles the setting correctly.
This guide explains Tomcat's three connector modes—BIO, NIO, and APR—shows how to install APR and native libraries, configure the server.xml protocol, and apply JVM and connector optimizations to dramatically improve concurrency and throughput.
This guide walks through identifying a Java process that spikes CPU usage, locating the offending thread with Linux tools, extracting its stack trace, pinpointing the problematic code in a socket utility class, and outlining the steps to resolve the infinite‑loop issue.
This guide details essential Tomcat startup parameters for both Linux and Windows environments, explains the purpose of each JVM option, and provides practical steps to test and adjust memory settings, helping you optimize server performance and avoid common pitfalls.
This article compares the core features, use cases, and performance characteristics of popular web and application servers—Apache, Tomcat, Jetty, Nginx, and JBoss—highlighting their distinctions in handling static versus dynamic content, scalability, and integration with Java and other technologies.