Details of event driven process of nginx based on epoll model

Epoll is an event driven model, which is one of the important reasons why nginx can efficiently handle client requests. From the flow point of view, the use of epoll model is mainly divided into three steps: the creation of epoll handle, listening to the addition of file descriptors and the triggering of waiting events. This paper will introduc ...

Added by gotissues68 on Tue, 14 Jan 2020 08:22:48 +0200

Replacing Zuul with Spring Cloud Gateway to access WebSocket

Reprinted from: https://www.bl-blog.com/a/9/27 Preface The previous project used Zuul gateway, which requires WebSocket, so I have been looking up the Spring Cloud Zuul's tutorials and articles on Forwarding WebSocket requests. I found that Zuul's support for WebSocket is not very friendly. To sum up, ...

Added by alecapone on Mon, 13 Jan 2020 11:42:48 +0200

[thinkphp5 operation redis series tutorial] pconnect (or popen) connection

1.pconnect /** * Connects to a Redis instance or reuse a connection already established with pconnect/popen. * * The connection will not be closed on close or end of request until the php process ends. * So be patient on to many open FD's (specially on redis server side) when using persistent connection ...

Added by smith.james0 on Thu, 02 Jan 2020 11:10:13 +0200

linux performance monitoring

Monitoring cpu usage uptime Purpose: print current time, system running time, current login user and cpu load [root@localhost ~]# uptime 20:24:06 up 9:56, 3 users, load average: 0.00, 0.01, 0.05 1 Minutes 5 minutes 10 minutes load Monitor the usage of memory and switch partit ...

Added by ceci on Wed, 01 Jan 2020 23:18:54 +0200

linux file find command details

1, Find file from index library: locate Index library: the operating system will periodically traverse the root file system, and then generate the index library Update index library manually: updatedb Syntax: locate [OPTION]... PATTERN Match basename only: - b Count the number of qualified documents: - c Use basic regular expression: - r ...

Added by realchamp on Tue, 24 Dec 2019 10:39:57 +0200

Oracle12c Linux x86-64 version installation

1. Add a new hard disk and format it [root@localhost ~]# cd /dev [root@localhost dev]# ls [root@localhost dev]# fdisk /dev/sdb [root@localhost dev]# mkfs -t xfs /dev/sdb1 2. Create orc directory [root@localhost dev]# mkdir /orc 3. Modify the host name [root@localhost ~]# vim /etc/hostname #Add the following to the last line HOSTNAME=oracle 4. ...

Added by spiritssight on Mon, 23 Dec 2019 16:31:59 +0200

python with statement combined with context manager

The so-called context manager is a class that rewrites the "enter" method and the "exit" method in a class. We can simplify some operations through the with statement in combination with the context manager. Use with statement and custom context manager to complete the corresponding operation of the database. The code is ...

Added by rostros on Thu, 19 Dec 2019 20:12:38 +0200

TCP programming is realized through Socket, and the communication between the client and the server is realized

Server side: 1. Create ServerSocket object and bind listening port; 2. Listen to the client request through the accept() method; 3. Read the request information sent by the client through the input stream after the connection is established; 4. Send response information to client through output; package com.wxd.socket; import java.io. ...

Added by cyronuts on Tue, 17 Dec 2019 23:25:29 +0200

026.4 upload text for network programming

In general, it is in the sealed jar package. Here, you can implement this function through the original steps##############################################################################Client steps:1. Determine the connection address and port2. Read files3. Get socket output stream4, send5. Send the end tag to the server to end the read opera ...

Added by PHPHorizons on Sun, 15 Dec 2019 22:02:04 +0200

Development of HTTP static Web server in Python

As we all know, Http protocol is a browser to server communication protocol based on Tcp protocol. Its basic principle is also to communicate through socket. When using HTTP protocol for communication, it is necessary to note that there is no problem with the format of the response message returned. The response message consists of four parts ...

Added by danieloberg on Fri, 13 Dec 2019 23:33:03 +0200