A database system configured to receive and process requests associated with time-series data, the database system comprising: a processing node comprising a computer processor and memory; a time-series database storing a first data segment file and a second data segment file, wherein the first data segment file comprises data associated with a first time-series, wherein a size of the first data segment file is within a first size range, wherein a size of the second data segment file is within the first size range; a global write-ahead log; an in-memory buffer associated with the first time-series; a local write-ahead log associated with the first time-series; and a computer readable storage medium storing program instructions, wherein the program instructions are configured for execution by the computer processor in order to cause the processing node to: receive second data associated with the first time-series; compress the second data; store the compressed second data in the global write-ahead log and in the in-memory buffer associated with the first time-series; transfer the compressed second data from the in-memory buffer associated with the first time-series into the local write-ahead log associated with the first time-series in response to the global write-ahead log reaching capacity and package the compressed second data stored in the local write-ahead log associated with the first time-series into the time-series database as the second data segment file in response to the local write-ahead log associated with the first time-series reaching or about to reach capacity; determine that a number of data segment files stored in the time-series database that comprise data associated with the first time-series and that have a size within the first size range is greater than a threshold value greater than one; in response to the determination, compact the first data segment file with the second data segment file to form a third data segment file, wherein a size of the third data segment file is within a second size range different than the first size range; and store the third data segment file in the time-series database. a processing node comprising a computer processor and memory; a time-series database storing a first data segment file and a second data segment file, wherein the first data segment file comprises data associated with a first time-series, wherein a size of the first data segment file is within a first size range, wherein a size of the second data segment file is within the first size range; a global write-ahead log; an in-memory buffer associated with the first time-series; a local write-ahead log associated with the first time-series; and a computer readable storage medium storing program instructions, wherein the program instructions are configured for execution by the computer processor in order to cause the processing node to: receive second data associated with the first time-series; compress the second data; store the compressed second data in the global write-ahead log and in the in-memory buffer associated with the first time-series; transfer the compressed second data from the in-memory buffer associated with the first time-series into the local write-ahead log associated with receive second data associated with the first time-series; compress the second data; store the compressed second data in the global write-ahead log and in the in-memory buffer associated with the first time-series; transfer the compressed second data from the in-memory buffer associated with the first time-series into the local write-ahead log associated with the first time-series in response to the global write-ahead log reaching capacity and package the compressed second data stored in the local write-ahead log associated with the first time-series into the time-series database as the second data segment file in response to the local write-ahead log associated with the first time-series reaching or about to reach capacity; determine that a number of data segment files stored in the time-series database that comprise data associated with the first time-series and that have a size within the first size range is greater than a threshold value greater than one; in response to the determination, compact the first data segment file with the second data segment file to form a third data segment file, wherein a size of the third data segment file is within a second size range different than the first size range; and store the third data segment file in the time-series database. in response to the determination, compact the first data segment file with the second data segment file to form a third data segment file, wherein a size of the third data segment file is within a second size range different than the first size range; and store the third data segment file in the time-series database.