Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

What Is Payload?

DZone's Guide to

What Is Payload?

In programming, the most common usage of the term is in the context of message protocols to differentiate the protocol overhead from the actual data.

· Performance Zone
Free Resource

Transform incident management with machine learning and analytics to help you maintain optimal performance and availability while keeping pace with the growing demands of digital business with this eBook, brought to you in partnership with BMC.

The term "payload" is used to distinguish between the so-called interesting information in a chunk of data and the overhead to support it. It is borrowed from transportation, where it refers to the part of the load that "pays." For example, a tanker truck may carry 20 tons of oil, but the fully loaded vehicle weighs much more than that — there's the vehicle itself, the driver, fuel, the tank, etc. It costs money to move all these, but the customer only cares about (and pays for) the oil, hence, payload.

In programming, the most common usage of the term is in the context of message protocols to differentiate the protocol overhead from the actual data. Take, for example, a JSON web service response that might look like this (formatted for readability):

{
    "status":"OK",
    "data":
        {
            "message":"Hello, world!"
        }
}

In this example, the string "Hello, world!" is the payload, the part that the recipient is interested in; the rest, while vital information, is protocol overhead.

Another notable use of the term is in malware. Malicious software usually has two objectives: spreading itself and performing some kind of modification on the target system (delete files, compromise system security, call home, etc.). The spreading part is the overhead, while the code that does the actual evil-doing is the payload.

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.

Topics:
payload ,devops ,programming ,software development

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}