Compared with the file mode, this process causes much greater overhead. In stdout mode, logs must go through several processes (such as the commonly used JSON LogDriver) from an application to a server: application stdout > DockerEngine > LogDriver > serialization to JSON > saving to a file > collection by the agent > JSON parsing > uploading to the server. In business scenarios, we recommend that you use the file mode whenever possible. However, this recommendation is based on scenarios where containers are used as simple applications. The logs can be stored in different ways such as default storage, EmptyDir, HostVolume, and NFS.Äocker officially recommends using stdout to output logs. In containers, logs can be written into files in a similar way as physical machines or virtual machines. DockerEngine takes over the stdout or stderr file descriptor and processes the received logs according to the LogDriver rules configured for the DockerEngine. In containers, logs are directly output to stdout or stderr in standard output mode. Unlike virtual machines or physical machines, Kubernetes containers support the standard output mode and the file mode. The following table summarizes the comparison between these collection methods:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |