Reasoning behind 204 for DELETE on non-existant objects

Why is a 204 is returned when deleting a non-existant object?

Wouldn’t a 404 be more approprate; to indicate the object does not exist, and it is not possible to delete?

$ http :8001/services
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Thu, 09 Aug 2018 15:16:58 GMT
Server: kong/0.33-enterprise-edition
Transfer-Encoding: chunked

{
    "data": [],
    "next": null
}


$ http delete :8001/services/123-123
HTTP/1.1 204 No Content
Access-Control-Allow-Origin: *
Connection: keep-alive
Date: Thu, 09 Aug 2018 15:17:14 GMT
Server: kong/0.33-enterprise-edition

Is the same as deleting an existing service.

$ http post :8001/services name=test url=https://httpbin.org
HTTP/1.1 201 Created
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Thu, 09 Aug 2018 15:17:56 GMT
Server: kong/0.33-enterprise-edition
Transfer-Encoding: chunked

{
    "connect_timeout": 60000,
    "created_at": 1533827876,
    "host": "httpbin.org",
    "id": "06d30d75-8eaa-4978-95f3-a9d7453fdb8d",
    "name": "test",
    "path": null,
    "port": 443,
    "protocol": "https",
    "read_timeout": 60000,
    "retries": 5,
    "updated_at": 1533827876,
    "write_timeout": 60000
}


$ http delete :8001/services/06d30d75-8eaa-4978-95f3-a9d7453fdb8d
HTTP/1.1 204 No Content
Access-Control-Allow-Origin: *
Connection: keep-alive
Date: Thu, 09 Aug 2018 15:18:07 GMT
Server: kong/0.33-enterprise-edition

IMO a 204 is technically a valid possibility (I cant really say its totally wrong), but I think 404 is more appropriate and gives better insight to a user, and reading a few consensus blogs and stack overflows online I found many agreed.

@UkiahSmith Hey there,

As discussed internally, the main reason for Kong responding with 204 is to avoid read-before-writes patterns, that it would otherwise have to follow when running on Cassandra.

Instead, the DELETE operation is considered idempotent and only has one result: after a resource has been deleted, whether or not it existed it now only has one state, which is that it does not exist anymore. In this respect, the DELETE method allows us to play nicely in the eventually consistent system that is Kong on top of Cassandra, and aligns well with the idempotency of another HTTP method, namely: PUT.