The invention belongs to the technical field of containers, and discloses a container log asynchronous streaming transmission method and
system based on a
thread pool and a
queue, and the method comprises the steps: receiving and analyzing a
hypertext transfer protocol request parameter which is initiated by a
client and is used for obtaining a target container log, and
processing the analyzed
hypertext transfer protocol request parameter, generating a log production task; the method comprises the following steps: receiving a log production task based on a pre-configured
thread pool, obtaining a log
stream of the log production task through a container engine, preprocessing the log
stream, and transmitting the preprocessed log
stream to a thread security
queue for storage; and transmitting the thread security
queue to a pre-configured
hypertext transfer protocol response header in a block coding format, refreshing to the
client, and judging whether the
hypertext transfer protocol response header detects a termination
signal or a thread event
signal. According to the invention, all resources which do not need to be used due to disconnection of the
client can be timely and thoroughly released, resource leakage is avoided, and the
system stability is improved.