I will probably focus on this for the next year. I will write a blog post and then publish a book after I finish it. I hope you can learn something from it


The first paper Performance tuning topics


Chapter 1 the Jvm

1.1 JVM class loading mechanism

1.1.1 Launcher Classes, Extension classes, application class loaders

1.1.2 Handwriting custom classloader

1.1.3 Parental delegation model and how to break it

1.2 JVM memory model

1.2.1 Heap memory generation mechanism and object life cycle

1.2.2 Internal structure of thread stack and stack frame

1.2.3 Method area (meta-space) and constant pool

1.2.4 Program counter

1.2.5 Local method stack

1.3 Four Reference types

1.3.1 Strong Reference

1.3.2 SoftReference SoftReference

1.3.3 WeakReference

1.3.4 Soft Reference and Weak Reference Scenarios

1.3.5 WeakHashMap case demonstration and analysis

1.3.6 Introduction to Virtual References

1.3.7 ReferenceQueue ReferenceQueue

1.3.8 Virtual Reference PhantomReference

1.4 Common JVM Parameters

1.4.1 Stack memory Xss

1.4.2 MetaspaceSize

1.4.3 Comparison of PrintGCDetails before and after Reclamation

1.4.4  SurvivorRatio

1.4.5 NewRatio option

1.4.6  MaxTenuringThreshold

1.5 Garbage collection mechanism

1.5.1 Serial Garbage Collector

1.5.2 ParNew garbage collector

1.5.3 Parallel garbage collector

1.5.4 ParallelOld Garbage collector

1.5.5 CMS Garbage Collector

1.5.6 G1 garbage collector

1.5.7 How do I Select the Garbage Collector

1.6 Garbage collection algorithm

1.6.1 Mark clearing algorithm

1.6.2 Replication Algorithm

1.6.3 Tag sorting algorithm

1.6.4 Generational garbage collection theory

1.7 JVM tuning tools

1.7.1 JDK comes with Jstat, Jinfo, Jmap, Jhat, and Jstack tuning commands

1.7.2 Jvisualvm, Jconsole tuning Tools

1.7.3 Alibaba JVM tuning tool Arthas

1.8 Log Analysis Tool

1.8.1 Using the GCEasy Log Analysis Tool

1.8.2 Using the GCViewer Log Analysis Tool

1.9 JVM memory model

1.9.1 JVM stack size setting strategy and tuning for daily million transactions system

Setting and tuning of garbage recovery parameters for young generation and old generation in the heap of 192 million grade flow e-commerce

1.9.3 How can high-concurrency systems optimize performance based on G1 garbage Collector

1.9.4 Why GC frequently occurs in a 100,000-per-second seckill system

1.9.5 Optimization of the actual combat where serious Full GC leads to the system directly jamming during e-commerce promotion activities

1.9.6 OOM Monitoring and Troubleshooting for the Online Production System

1.10 Online Troubleshooting

1.10.1 machine top

1.10.2 CPU Viewing VMstat

1.10.3 CPU Viewing pidstat

1.10.4 Memory Viewing Free and pidstat

1.10.5 Disk Query df

1.10.6 Disk I/O Viewing iostat and pidstat

1.10.7 Network I/O Viewing IFstat

1.10.8 Locating a High CPU Usage

Chapter 2 Mysql

2.1 Mysql Index data Structure

2.1.1 B + tree

2.1.2  Hash

2.1.3 the red-black tree

2.2 Mysql Execution plan and Index

2.2.1 Use of explain tools

2.2.2 Index optimization best practices

2.3 Mysql lock mechanism and transaction isolation level

2.3.1 Mysql lock

2.3.2 Transaction isolation level

2.3.3 Multi-version concurrency control MVCC mechanism

2.4 Slow Query Sql Tuning Combat

Chapter 3 Tomcat

3.1 Tomcat Project Architecture

3.1.1 Understand Tomat startup process

3.1.2 Understand the process of parsing and processing Http requests

3.1.3 Cognition of core components

3.1.4 Comparison between Tomcat8 and Tomcat7

3.2 Configuring the Production Environment

3.2.1 Tomcat server. XML Configuration

3.2.2 Tomcat Cluster and Session Replication Scheme Implementation

3.2.3 Tomcat Virtual Host Configuration

3.2.4 Comparison between Tomcat8 and Tomcat7

3.3 Principles behind the Tomcat thread model

Chapter 4 Performance pressure measurement

4.1 Pressure Test

4.1.1 Basic Introduction

4.1.2 Apache JMeter Installation and Use

4.1.3 JMeter address occupation bug in Windows is resolved

4.2 Performance Monitoring

4.2.1 Heap memory and garbage collection

4.2.2 jvisualvm use

4.3 Performance Test

4.3.1 Impact of middleware on Performance

4.3.2 Simply Optimize throughput tests

4.4 Optimization of actual combat cases

4.4.1 Nginx Static and static Separation

4.4.2 Application Memory Crashes on the Analog Line

4.4.3 Optimize three-level classification data acquisition

Chapter 5 Asynchrony

5.1 the thread pool

5.2 Basic introduction to CompletableFuture

5.3 CompletableFuture Starts an asynchronous task

5.4 Complete callback and exception detection

5.5 Handle Final processing

5.6 Thread serialization

5.7 Both task combinations should be completed

5.8 Multi-task Combination

六四屠杀The second article六四屠杀concurrent programming


Chapter 6 JMM Memory Model

6.1 Fundamentals of modern computer models

6.2 What is a Thread In-depth understanding of Java threads

6.3 Volatile Keyword

6.3.1 JMM Volatile Cache Consistency Protocol

6.3.3 What is volatile

6.3.3 Visibility of JMM memory model

6.3.4 Code verification for visibility

6.3.5 Volatile does not guarantee atomicity

6.3.6 Resolve the issue that volatile does not guarantee atomicity

6.3.7 Reordering of Volatile Instructions

6.3.8 The Singleton Mode may cause security problems in a multi-threaded environment

6.3.9 Singleton Volatile Analysis

6.3.10 Sequence consistency, happens-beofre as-if-serial

6.4 the CAS

6.4.1 What is CAS

6.4.2 Underlying CAS Principles

6.4.3 CAS shortcomings

6.4.4 ABA problem

6.4.5 AtomicReference Atom reference

6.4.6 AtomicStampedReference Atom reference of version number

6.4.7 ABA problem solving

Chapter 7 Concurrent synchronization processing

7.1 Implementation principles of Synchronized built-in lock

7.2 Analysis of Synchronized Lock Expansion and Upgrade Process

7.3 AbstractQueuedSynchronizer (AQS)

7.4 Optimistic lock, pessimistic lock, reentrant lock, fair lock, unfair lock, and lock granularity

7.5 already/ReentrantReadWriteLock, ReadWriteLock

7.6 Condition Queue Indicates the synchronization queue

Chapter 8 Restrictions on tools for simultaneous distribution

8.1  CountDownLatch

8.2 a Semaphore

8.3  CyclicBarrier

In chapter 9, atomic operation of packet dispatching

9.1 Atomic Class ThreadLocal ABA JMM

9.2 CAS Optimistic Locking

9.3 Unsafe Magic classes

Chapter 10 Java Locks

10.1 Fair and Unfair locks

10.2 Reentrant locking and recursive locking

10.3 the spin lock

10.4 read-write lock

10.5 a deadlock

Chapter 11 blocking queues

11.1 introduction

11.2 Interface structure and implementation classes

11.3 Throwing an exception group

11.4 Returns a Boolean value group

11.5 Blocking and timeout control

11.6 SynchronousQueue SynchronousQueue

11.7 Producer Consumer Traditional edition

11.8 Binding Multiple Conditions to a Lock

11.9 Producer consumer blocks the queue version

11.10 Synchronized and the Lock

11.11 ArrayBlockingQueue Array bounded queue

11.12 ConcurrentLinkedQueue Indicates a bounded queue of the linked list

11.13 PriorityBlockingQueue Unbounded queue

11.14 DelayQueue indicates an unbounded DelayQueue

Chapter 12 concurrent Map, List, and Set

12.1 Unsafe concurrent modification of a collection class

12.1 HashMap and ConcurrentHashMap source code Analysis

12.2 ArrayList, LinkedList, and CopyOnWriteArrayList

12.3 Set and CopyOnWriteArraySet

Chapter 13 thread pools

13.1 Callable interface

13.2 Use and advantages of thread pools

13.3 Three common thread pool modes

13.4 Thread Pool 7 Parameters

13.5 Underlying Working Principles of a Thread Pool

13.6 Four Rejection policies for a thread pool

13.7 Which thread pool is actually used

13.8 Configuring a proper number of threads in a Thread Pool

13.9 Futrue mode

13.10  ThreadPoolExecutor

13.11  ScheduledExecutorService

Chapter 14 ForkJoin framework

14.1 Introduction to ForkJoin framework

14.2 ForkJoin case

ForkJoin principle analysis

The first three Chapter Distributed Framework


Chapter 15 distributed messaging middleware

15.1 the Rabbitmq

15.1.1 Getting Started with Rabbitmq and HA Cluster Deployment

15.1.2 Rabbitmq Message Distribution and Subject Message Distribution

15.1.3 Rabbitmq Message Routing Mechanism

15.1.4 Rabbitmq Message Confirmation Mechanism

15.1.5 Using the Rabbitmq Web Monitoring Platform

15.1.6 Rabbitmq Mirror Queue

15.2  RocketMq

15.2.1 Decrypting RocketMq Cluster Deployment and Quick Start

15.2.2 Analyzing the RocketMq module division and cluster principle

15.2.3 Ordinary Messages, Sequential Messages, transaction Messages, and Scheduled Messages

15.2.4 In-depth RocketMq Broker, Consumer, Producer source code

15.2.5 RocketMq Monitoring and O&M

15.2.6 API architecture development of RocketMq messaging middleware

15.3  Kafka

15.3.1 Introduction and comparison of Kafka development

15.3.2 Setting up and Using a Kafka Cluster

15.3.3 Kafka Copy Mechanism and Election Mechanism

15.3.4 Analysis of Kafka architecture Design Principle

15.3.5 Implementation principle analysis of large-scale log system based on Kafka

Best practices for Kafka Performance Optimization for 1.536 billion level flow production systems

Chapter 16 distributed transactions

16.1 Local Transactions in Distributed Mode

16.2 Local transaction isolation level & Propagation behavior, etc

16.3 Distributed CAP&Raft principles

16.4 the BASE

16.5 Common Solutions for Distributed Transactions

16.6 Seata& Environmental Preparation

16.7 Seata Distributed Transaction Experience

16.8 Final Consistency Inventory Unlocking Logic

Chapter 17 distributed storage Middleware

17.1 Redis

17.1.1 Redis core data structure analysis

17.1.2 Practice of Redis in Weibo, wechat and e-shopping mall

17.1.3 Redis Persistence mechanism and security mechanism

17.1.4 Redis master-slave and sentry architecture

17.1.5 Redis Cluster Architecture Combat and Principles

17.1.6 Cluster Data Sharding algorithm and Dynamic Horizontal Expansion

17.1.7 Jedis and Redisson Client source Code Analysis

17.1.8 Redis High Concurrency Distributed lock Combat

17.1.9 Redis Cache penetration, Cache invalidation, and cache avalanche

17.1.10 Redis Bloom filter implementation

17.1.11 Redis cache design and performance optimization

17.2 mongo

17.2.1 Basic Concepts of MongoDB Database, collection, index, and document

17.2.2 Setting up a MongoDB HA Cluster

17.2.3 MongoDB performance optimization best practices

17.3  FastDFS

17.3.1 FastDFS Application background and principle

17.3.2 FastDFS File Storage Project

17.3.3 FastDFS Distributed Deployment Scenarios

17.4  Elasticsearch

17.4.1 Quick Start of Elasticsearch, Logstash, and Kibana

17.4.2 Deploying Elasticsearch, Logstash, and Kibana Clusters

17.4.3 Elasticsearch, Logstash, and Kibana Architecture and Principle Analysis

17.4.4 Advanced Query of Elasticsearch

17.4.5 Underlying Principles of Elasticsearch

Chapter 18 distributed Frameworks

18.1 a Zookeeper

18.1.1 Zookeeper Quick Start

18.1.2 Deployment of Zookeeper in a Multi-Node Cluster

18.1.3 Typical Zookeeper Application Scenarios Actual Deployment

18.1.4 ZNode, Watcher, ACL, and client APIS in Zookeeper

18.1.5 Analyzing the Zookeeper Client Server Source Code

18.1.6 Zookeeper Migration, Capacity Expansion, and Monitoring

18.2  Dubbo

18.2.1 Dubbo enterprise application practice

18.2.2 Dubbo Calls the module

18.2.3 Analysis of Dubbo fault tolerance mechanism and high scalability

18.2.4 Basic Principles and Implementation of Dubbo RPC protocol

18.2.5 Dubbo design principle analysis and source code

18.2.6 Dubbo Load Balancing Policy Analysis

18.2.7 Dubbo Control Background management and deployment

18.3  ShardingSphere

18.3.1 Data Read/Write Separation and Database and Table Separation scenarios

18.3.2 Common Data Sharding Algorithms Hash, List, range, and Tag

18.3.3 Comparison between Common database middleware Mycat and ShardingSphere

18.3.4 Decrypting sharding-JDBC core concepts and Fast Start

18.3.5 In-depth Sharding-JDBC feature and module division

18.3.6 Development of sub-database and sub-table of Orders and ordersItem in actual combat order trading

18.3.7 Source CODE SQL parsing, SQL routing, SQL rewriting, SQL execution, result merge

18.4  Netty

18.4.1 Basic progress of Network and IO Model

18.4.2 BIO, NIO, and AIO thread models

18.4.3 Netty thread model and source code analysis

18.4.4 High-performance serialization protocol Protobuf and source code analysis

18.4.5 Sticking and unpacking phenomenon and solutions, codec source code analysis

18.4.6 Netty Heartbeat Mechanism Source Code Analysis

18.4.7 Direct Memory and Netty Zero Copy

18.4.8 Netty Http protocol Development and Application

18.4.9 Netty WebSocket Protocol Development and Application

The first four article Micro service


Chapter 19: Evolution history of microservices architecture

19.1 Evolution history of Taobao e-commerce micro-service structure

19.2 Evolution history of Jd’s e-commerce wechat service structure

Chapter 20 Spring Boot and source code analysis

20.1 Spring Boot Fast start and core configuration

20.2 Spring Boot Deployment Mode and Hot deployment

20.3 Web development template engine Thymeleaf and Freemarker

Spring Boot integrates Mybatis, Redis, RabbitMq and other three-party frameworks

20.5 Spring Boot Boot process source code analysis

20.6 Spring Boot automatic assembly source code analysis

Chapter 21 Spring Cloud Alibaba and source code analysis

21.1 Nacos Registry

21.1.1 Service Registration and Discovery

21.1.2 Service Heartbeat And Offline

21.1.3 Service Health Check

21.1.4 Actual Nacos cluster Architecture

21.1.5 Nacos Synchronizing service data between cluster nodes

21.1.6 Nacos Cluster Architecture CAP Principle

21.1.7 Nacos source code high concurrency design essence

21.1.8 Design architecture of Aliyun Super-scale Micro-service Registry

21.2 Ribbon Client Load Balancing

21.2.1 Ribbon Service Discovery and Client Caching

21.2.2 Ribbon Client Load Balancing

21.2.3 Customizing the Extended Ribbon Client Load Balancing Algorithm

21.2.4 Ribbon framework source code design defects and optimization

21.3 Feign Declarative service invocation

21.3.1 Feign method parameters concatenate Http requests

21.3.2 Feign integrates the Ribbon

21.4 Sentinel current limiting downgrade fuse

21.4.1 current-limiting

21.4.2 Fuse downgrade

21.4.3 Hotspot Traffic Limiting Rules

21.4.4 System Load Current Limiting

21.4.5 System Blacklist and Whitelist Authorization Rules Limit traffic

21.5 Gateway Unified Gateway

21.5.1 Dynamic Service Routing

21.5.2 Unified Service Current Limiting Fuse

21.5.3 Unified Service Caching

21.5.4 Unified Service Authorization Authentication

21.5.5 Unified Service Performance Monitoring

21.5.6 Uniform grayscale release of services

21.6 Nacos Distributed Configuration Center

21.6.1 Deployment of the HA Distributed Configuration Center

21.6.2 Switching between Multiple Environments and Configuring Sharing

21.6.3 Dynamic Configuration refresh and Service hot loading during runtime

21.7 Seata microservices distributed transactions

21.7.1 Seata Global transaction registration

21.7.2 Seata branch transaction client registration

21.7.3 Seata branch transaction client global lock conflict spin design

21.7.4 Seata branch transaction server global lock design

21.7.5 Seata global transaction commit

21.7.6 Seata Global Transaction Rollback

21.7.7 Seata branch transaction phase 2 asynchronous commit

21.7.8 Seata branch transaction phase 2 generates reverse Sql to perform rollback

21.8 User authentication and authorization of micro-services

21.8.1 Micro service API security mechanism

21.8.2 Oauth2 protocol for microservice security

21.8.3 Authentication and authorization of traditional Session for micro-service security

21.8.4 Authentication and authorization of Token mechanism for micro service security

21.8.5 JWT Security Authentication scheme

Chapter 22 Spring Cloud Netflix

22.1 Eureka Service Registration and discovery

22.2 Ribbon Client Load Balancing

22.3 Fegin declarative service invocation

22.4 Hystrix implements traffic limiting, downgrading, and fusing

22.5 Hystrix implements custom interface degradation, monitoring data, and monitoring data aggregation

22.6 Zuul Unified gateway, service routing, and filter usage

22.7 Distributed Configuration Center Config

22.8 Distributed Link Tracing Sleuth

Chapter 23 virtual Containers

23.1 Docker for virtual Services

23.1.1 Docker image, warehouse and container

23.1.2 Quickly Start Building a Docker Environment

23.1.3 DockerFile use

DockerCompose Integrated application portfolio

23.1.5 Implementation of Docker service choreography

23.2 Kubernetes Container Management

23.2.1 Introduction to Kubernetes and quick start

23.2.2 Construction and use of Kubernetes production cluster environment

Chapter 24 k8s

24.1 K8S entry and cluster building

24.1.1 k8s profile

24.1.2K8S – Architectural principles & Core Concepts

24.1.3K8S – Cluster Setup – Environment preparation

24.1.4K8S – Cluster Setup – Create three VMS

24.1.5K8S – Cluster Setup -NAT network and pre-environment

24.1.6K8S – Cluster setup – Install Docker, Kubelet, kubeadm, kubectl

24.1.7K8S – Cluster Setup – Cluster Installation

24.2 introduction to k8s

24.2.1 Basic Operation Experience

24.2.2 YAML & Basic use

24.2.3 Pod, Service and other concepts

24.2.4  Ingress

24.3 Installation, configuration and use of Kubesphere

24.3.1 Installing the Pre-Environment

24.3.2 Installation Minimize installation

24.3.3 Installation This section describes the customized installation and interface

24.3.4 Creating a Multi-tenant System

24.3.5 Creating a WordPress Application – Keys

24.3.6 Creating a WordPress Application – Create a container

24.3.7 Creating a WordPress Application – Internet access

24.3.8 What is DevOps

24.3.9 Pipeline creating credentials

24.3.10 Complete CICD experience of assembly line

24.4 the cluster

24.4.1 Common Forms of clusters

24.4.2 Common MySQL cluster forms

24.4.3 MySQL primary/secondary Synchronization

24.4.4 ShardingSphere profile

24.4.5 Basic principles of Redis-cluster

24.4.6 Redis-cluster Cluster Construction

24.4.7 Mechanism of ElasticSearch Cluster

24.4.8 ElasticSearch Cluster Construction

24.4.9 Setting up a RabbitMQ Image Cluster

24.5 k8s deployment

24.5.1 K8S deploy MySQL

24.5.2 K8S deploy Redis

24.5.3 k8s deployment ElasticSearch&Kibana

24.5.4 K8s Deploy RabbitMQ

24.5.5K8S deploy Nacos

24.5.6 K8S deploy Zipkin

24.5.7 K8S Deploy Sentinel

24.5.8 K8S Application deployment process

24.5.9 Production Environment configuration Extraction

24.5.10 Creating a microservice Dockerfile

24.5.11 Creating a Microservice K8S Deployment Description File

24.5.12 Understand targetPort, Port, and NodePort

24.6 line

24.6.1 Gitee pull code

24.6.2 Parameterized builds & Environment variables

Sonar code quality analysis

24.6.4 Building & Pushing An Image

24.6.5 Assembly line writing

24.6.6 Migrating databases

Streamline Details Optimization & Solve OOM

24.6.8 Deploying microservices on an Assembly Line

24.6.9 Docker Image Operations

24.6.10 Integrate Ali Cloud mirror warehouse

Jenkins modified ali Cloud mirror warehouse

24.6.12 deployment of gateway

Auth – server 24.6.13 deployment

24.6.14 deployment cart

24.6.15 deployment coupon

24.6.16 Deployment & Bug fixes

24.6.17 Change to a Public Repository

24.7 Project Deployment

24.7.1 Deploying pre-Nginx

24.7.2 Creating a Gateway and Application Route

24.7.3 Online mall system

24.7.4 Deploying the VUE Project

24.7.5 Testing rolling update deployment admin-vue-app

24.7.6 Online warning and monitoring

24.7.7 summary