官术网_书友最值得收藏!

Standard response headers

All services should return the following headers.

  • Date: The date that the request was processed in RFC 3339 format.
  • Content-Type: The content type of the response.
  • Content-Encoding: gzip or deflate.
  • X-Request-ID/X-Correlation-ID: Whilst you may not directly request your clients to implement this header it may be something that you add to requests when you call downstream services. When you are trying to debug a service that is running in production it can be incredibly useful to be able to group all the requests by a single transaction ID. A common practice that we will see when we look at logging and monitoring is to store all logs in a common database such as Elastic Search. By setting the standard way of working when building many connected microservices that they pass the correlation ID with each downstream call you will be able to query your logs in Kibana or another log query tool and group them into a single transaction:
        X-Request-ID: f058ebd6-02f7-4d3f-942e-904344e8cde 
主站蜘蛛池模板: 阿勒泰市| 江都市| 聂荣县| 深水埗区| 阳江市| 巴彦淖尔市| 西宁市| 盱眙县| 凤冈县| 上虞市| 江永县| 德格县| 达孜县| 天台县| 尉犁县| 金平| 大冶市| 留坝县| 白沙| 寻甸| 互助| 英超| 吉水县| 垫江县| 礼泉县| 长寿区| 武隆县| 九龙县| 普陀区| 金山区| 堆龙德庆县| 洛隆县| 衡东县| 电白县| 泌阳县| 迭部县| 宁海县| 海原县| 海阳市| 应用必备| 乐业县|