Explanation using a story/analogy
You can think of X-Request-ID like some type of ID card so you can be uniquely identified. Well what does that mean?
I have a silly DMV story (to help me remember):
- You get a "ticket" (with an ID number) from a dispenser, and then you
- Stand in line, for 16 hours,
- after 16 hours - I meet the customer care rep and she tells me there is a problem: the 12 signatures I signed were not matching perfectly.
- The petty tyrant tells me to go to the back of the line and by that time it was too late - the DMV were closing for the day and I had to come in again the next day. i.e. my request timed out. (DMV folks don't work a micro-second past 3:59:00:00).
An entire day wasted - you complain to the DMV customer care - and they reply:
"When I look through the DMV records, how am I meant to identify you - when you came etc.?
That's where the X-Request-ID comes in. Just show him the number and they can track your request.....
Application of story to HTTP
The same applies to http requests - it's an id used to help back end devs find out what went wrong. Clients submit requests with that id - and it's a ID that they create (i.e. some random number etc.). Now servers can keep track of it.
Story given to help you remember.
Hopefully you're not confused even further - post a comment if I have and i'll try to clear it up. thx.