News for hackers. Stuff that matters.
Re:AWS vs. GCP reliability is wildly different by eurasiantiger on Wednesday September 21, 2022 @06:11PM (#32932242)
503 service unavailable?
Re:AWS vs. GCP reliability is wildly different by danielmarkbruce on Wednesday September 21, 2022 @07:23PM (#32932943)
It's not the service that's unavailable. The resource isn't available. The service is running just fine.
Re:AWS vs. GCP reliability is wildly different by verdverm on Wednesday September 21, 2022 @08:04PM (#32933259)
GCP error messages will indicate if resources were not available, if you reached your quota, or if it was some other error. Tests like OP can differentiate these situations
Re:AWS vs. GCP reliability is wildly different by yjftsjthsd-h on Wednesday September 21, 2022 @07:07PM (#32932802)
Yeah, 4xx is client error, 5xx is server error.
Re:AWS vs. GCP reliability is wildly different by pdpi on Thursday September 22, 2022 @05:18AM (#32936528)
Yes, and trying to create duplicate resources is a client error.
Re:AWS vs. GCP reliability is wildly different by eurasiantiger on Thursday September 22, 2022 @06:24AM (#32936970)
Still, 409 seems inappropriate, as it is meant to signal a version conflict, i.e. someone else changed something, and user tried to uplod a stale version.

”10.4.10 409 Conflict

The request could not be completed due to a conflict with the current state of the resource. This code is only allowed in situations where it is expected that the user might be able to resolve the conflict and resubmit the request. The response body SHOULD include enough information for the user to recognize the source of the conflict. Ideally, the response entity would include enough information for the user or user agent to fix the problem; however, that might not be possible and is not required.

Conflicts are most likely to occur in response to a PUT request. For example, if versioning were being used and the entity being PUT included changes to a resource which conflict with those made by an earlier (third-party) request, the server might use the 409 response to indicate that it can't complete the request. In this case, the response entity would likely contain a list of the differences between the two versions in a format defined by the response Content-Type.”

Then again, perhaps it is the service itself making that state change.

Re:AWS vs. GCP reliability is wildly different by sn0wf1re on Wednesday September 21, 2022 @06:50PM (#32932629)
That would be confusing. The HTTP response code should not be conflated with the application's state.
Re:AWS vs. GCP reliability is wildly different by eurasiantiger on Thursday September 22, 2022 @01:27AM (#32935084)
There will come a moment in time when you realize exactly what you have stated here and why it is not a good mental palace to live in.
Re:AWS vs. GCP reliability is wildly different by dheera on Wednesday September 21, 2022 @06:44PM (#32932565)
Using HTTP error codes for non-REST things is cringe.

503 would mean the IaaS API calls themselves are unavailable. Very different from the API working perfectly fine but the instances not being available.

Re:AWS vs. GCP reliability is wildly different by devmunchies on Wednesday September 21, 2022 @07:34PM (#32933038)
What? REST is just some API philosophy, its doesn't even have to be on top of HTTP.

Why would you think HTTP status codes are made for REST? They are made for HTTP to describe the response of the resource you are requesting, and the AWS API uses HTTP so it makes sense to use HTTP status codes.