CoAP Protocol: Definition, Architecture 📌

A Quick Overview

  1. Acknowledgments confirm the completion or failure of an event.
  2. Confirmable are the messages that are resent on time out until the confirmation of successful sending doesn’t arrive.
  3. Reset messages are empty, with confirmable as their nature.
  4. Non-confirmable information is just sent and has no guarantee of successful delivery. There is no acknowledgment of success either.
  • Works for devices in the same network types.
  • Enables data transmission, to and fro, for the general internet-enabled nodes and network-connected devices.
  • Works really fine for SMSs shared over mobile network connectivity.
  • Suitable for internet-operative applications that use connected devices/sensors and have resource limitations.
  • Capable of translating HTTP, supports multicast, and exerts the bare minimum cost burden.
  • Only helps machines to communicate (in the network).

CoAP Architecture

  • Endpoints are the nodes that host have knowledge of;
  • Client sends requests and replies to incoming requests;
  • Server gets and forwards requests. It also gets and forwards the messages received in response to the requests it had processed.
  • Sender creates and sends the original message.
  • Recipient gets the information sent by the client or forwarded by the server.

CoAP Function

CoAP Features

CoAP Layer

  1. CoAP Messages Model
  1. If idle, the server will handle the request right away. If a CON, the client will get an ACK for it. If the ACK is shared as a Token and differs from the ID, it is essential to map it properly by matching request-response pairs.
  2. If there is a delay or wait involved, the ACK is sent but as an empty text. When its turn arrives, the request is processed and the client gets a fresh CON.
  • Request or response codes for CoAP are same as for the HTTP, except for the fact that they are in the binary format (0–8 byte Tokens) in CoAP’s case.
  • Request methods for making calls (GET, PUT, POST, and DELETE) are declared in the process.
  • A CON response could either be stored in an ACK message or forward as CON/NON.


REST Protocol and CoAP




CEO at Wallarm. Application security platform to prevent threats and discover vulnerabilities in a real-time.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Using yarn workspaces to consolidate development of several Single Page applications

AZ-140 Azure Virtual Desktop Specialty Exam Tips

Wat is Mavan | use of maven

Stack and binary tree

All of our apps explained + freebies

Trying out coding

Understanding VoIP: A beginner’s guide to internet telephony using an analogy

AWS Services Overview — Part-1

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ivan Novikov

Ivan Novikov

CEO at Wallarm. Application security platform to prevent threats and discover vulnerabilities in a real-time.

More from Medium

Log4Shell Log4J vulnerability CVE-2021–44228 — Explained .


Understanding Log4Shell —A Log4J Zero-Day Exploit

New Input System with Unity Learn — Lesson 1