1. Second line
Each newline is another point; one request can carry thousands of lines.
cpu,host=b usage=0.71 1700000000Typorithm · medium
Step 1 of 8 · intro card
Line Protocol
Batch many lines into one request for throughput, model low-cardinality identifiers as indexed tags and raw values as fields, and pick a timestamp precision that fits the whole batch.
Sending points one at a time is slow; batching many newline-separated lines per request cuts round trips dramatically.
Design each line deliberately: tags are indexed and should stay low-cardinality (host, region), while fields hold the unindexed measured values.
High-cardinality data as tags (like a user id) explodes the index, so push those into fields and share one --precision across the batch.
Many newline-separated lines = one efficient request.
Tags are indexed; keep them low-cardinality.
Fields are unindexed values; high-cardinality data belongs here.
influx write -b metrics --precision s "cpu,host=a usage=0.64 1700000000
cpu,host=b usage=0.71 1700000000
mem,host=a used=812 1700000000"Connect each part of the code to the concept before you type.
Each newline is another point; one request can carry thousands of lines.
cpu,host=b usage=0.71 1700000000A single batch may mix measurements and tags freely.
mem,host=a used=812 1700000000host is a tag — indexed and low-cardinality, ideal for filtering and grouping.
host=aOne precision flag governs every timestamp in the batch.
--precision sRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.