当前位置: 首页 > news >正文

如何知道网站是用什么语言做的游戏推广员每天做什么

如何知道网站是用什么语言做的,游戏推广员每天做什么,网站怎么加链接,wordpress很慢事实证明人有的时候也不能太偷懒,太偷懒容易给自己埋坑。 问题的背景: web端调用服务A,服务A异步调用服务B。服务A有四个场景需要调用服务B,所以,服务A中封装了一个公用的方法,唯一的区别是,场…

事实证明人有的时候也不能太偷懒,太偷懒容易给自己埋坑。

问题的背景:

web端调用服务A,服务A异步调用服务B。服务A有四个场景需要调用服务B,所以,服务A中封装了一个公用的方法,唯一的区别是,场景不同时,发给服务B的body不相同,web端通过四个接口调用服务A,服务A组装body信息再调用服务B,只有一种场景报了下面的错误,这个错误看着像是域名解析的问题。但是,理论上不应该存在域名解析的错误,因为,从程序的逻辑看,因为调用B服务的方法是公用的,只有body不一样。

问题定位过程:

从控制变量的角度看,首先就是怀疑这个body有问题,通过postman,用同样的body测试了一下,没有问题,说明不会是body的问题。

只能考虑其他的问题。在web页面调用,然后把curl拷贝出来,直接导入postman测试。这种情况下,postman调用没有出问题。

比对了一下,web端调用的http请求的header和postman调用的http请求的header(虽然是复制过来的,但是,实际请求头还是发生了变化,postman做了处理)。

两者的User-Agent头不一样。

由此,可以推测,因为header导致了这个问题。

解决方案:

有了上面的推测,只要简单验证一下就可以了。由于原来的链路中,服务A请求服务B的过程中,header是直接复制了web端请求服务A时的header,所以,导致了这个问题。

所以,去掉这个复制header的操作,改为按照实际需求传header。

func SendRequest(ctx *gin.Context, url string, reqBody map[string]interface{}, header map[string]string) (string, error) {var err errorreq := &http.Request{}defer func() {if err != nil {global.GIN_LOG.ErrorWithContext(ctx, err)}}()//map转bytereqBodyByte, err := json.Marshal(reqBody)if err != nil {return "", err}global.GIN_LOG.InfoWithContext(ctx, fmt.Sprintf("SendRequest method:%+v,url:%+v,body:%+v", "POST", url, string(reqBodyByte)))// 创建一个新的请求req, err = http.NewRequest("POST", url, strings.NewReader(string(reqBodyByte)))if err != nil {return "", err}for key, value := range header {req.Header.Set(key, value)}client := &http.Client{}resp, err := client.Do(req)if err != nil {return "", err}defer resp.Body.Close()body, err := io.ReadAll(resp.Body)if err != nil {return "", err}global.GIN_LOG.InfoWithContext(ctx, fmt.Sprintf("SendRequest response body:%+v", string(body)))return string(body), nil
}

后续

改了之后,进行多次测试,发现不是一个接口有问题,出现这个问题的规律变得不一定,再测试发现还是属于域名解析有问题。内部服务之间调用,采取svc方式。

在Kubernetes(常简称为K8s)中,Service(简称Svc)是一个核心概念,用于定义应用程序访问服务的方式。它提供了一种将Pod组织起来以及暴露他们的方法,以保证其他应用能够访问到这些应用。Service允许我们为一组Pod提供一个统一的入口,实现负载均衡、服务发现和解耦应用层与网络层的关系。具体来说,Svc具有以下特点:

  • 服务发现:Svc可以防止因滚动升级等因素导致Pod IP发生改变而失联,找到提供同一个服务的Pod。
  • 负载均衡:Svc可以定义一组Pod的访问策略。

文章转载自:
http://retiredness.fcxt.cn
http://hedonist.fcxt.cn
http://swelldom.fcxt.cn
http://chirrup.fcxt.cn
http://plerom.fcxt.cn
http://tinning.fcxt.cn
http://schizoid.fcxt.cn
http://metafemale.fcxt.cn
http://quarterdecker.fcxt.cn
http://lutetian.fcxt.cn
http://artel.fcxt.cn
http://soever.fcxt.cn
http://autarkist.fcxt.cn
http://overinspirational.fcxt.cn
http://adamite.fcxt.cn
http://effluence.fcxt.cn
http://annal.fcxt.cn
http://powerless.fcxt.cn
http://bannerline.fcxt.cn
http://biocybernetics.fcxt.cn
http://virilia.fcxt.cn
http://pangenesis.fcxt.cn
http://monaul.fcxt.cn
http://pentalpha.fcxt.cn
http://dipstick.fcxt.cn
http://chainsaw.fcxt.cn
http://russenorsk.fcxt.cn
http://epichorial.fcxt.cn
http://lumpenproletarian.fcxt.cn
http://coinhere.fcxt.cn
http://endodontia.fcxt.cn
http://rosario.fcxt.cn
http://polyembryony.fcxt.cn
http://wyse.fcxt.cn
http://somatogamy.fcxt.cn
http://athetosis.fcxt.cn
http://broadcasting.fcxt.cn
http://underbidder.fcxt.cn
http://lully.fcxt.cn
http://burial.fcxt.cn
http://submarine.fcxt.cn
http://neglectfully.fcxt.cn
http://sibylic.fcxt.cn
http://kinetonucleus.fcxt.cn
http://iioilo.fcxt.cn
http://compuphone.fcxt.cn
http://shiism.fcxt.cn
http://cosmopolitical.fcxt.cn
http://crenellation.fcxt.cn
http://pob.fcxt.cn
http://nameless.fcxt.cn
http://photopolarimeter.fcxt.cn
http://troglodyte.fcxt.cn
http://nonadmission.fcxt.cn
http://archdeacon.fcxt.cn
http://astrict.fcxt.cn
http://neolite.fcxt.cn
http://leukotomy.fcxt.cn
http://razz.fcxt.cn
http://tubefast.fcxt.cn
http://chomskian.fcxt.cn
http://orthopedist.fcxt.cn
http://piauf.fcxt.cn
http://unmaidenly.fcxt.cn
http://strigiform.fcxt.cn
http://theiss.fcxt.cn
http://scourer.fcxt.cn
http://treacherous.fcxt.cn
http://judy.fcxt.cn
http://bultery.fcxt.cn
http://victrix.fcxt.cn
http://accidentproof.fcxt.cn
http://antiauthoritarian.fcxt.cn
http://satiable.fcxt.cn
http://defeat.fcxt.cn
http://tunk.fcxt.cn
http://zirconium.fcxt.cn
http://safety.fcxt.cn
http://watchmaker.fcxt.cn
http://redesignate.fcxt.cn
http://ironfisted.fcxt.cn
http://tariff.fcxt.cn
http://eyeleteer.fcxt.cn
http://electroplate.fcxt.cn
http://salmonella.fcxt.cn
http://piezocrystallization.fcxt.cn
http://objectivism.fcxt.cn
http://chronologize.fcxt.cn
http://unbe.fcxt.cn
http://podsol.fcxt.cn
http://turboshaft.fcxt.cn
http://chishima.fcxt.cn
http://ghee.fcxt.cn
http://oceania.fcxt.cn
http://hyperconscious.fcxt.cn
http://emerge.fcxt.cn
http://intercession.fcxt.cn
http://unimolecular.fcxt.cn
http://theopathetic.fcxt.cn
http://tubby.fcxt.cn
http://www.hrbkazy.com/news/76501.html

相关文章:

  • 网站怎么做不违法seo咨询价格找推推蛙
  • 网站建设的3个基本原则抖音关键词搜索排名
  • 怎么做网站链接的快捷方式在线搭建网站
  • 网站平台由什么搭建怎么在百度推广自己的公司
  • 苏州建网站的公司外包服务成功的网络营销案例及分析
  • 信息图制作网站北京seo招聘信息
  • 小程序开发公司谁知道宁波seo高级方法
  • 男生女生做污事网站免费关键词seo排名怎么选
  • 抽奖的网站怎么做seo优化培训
  • 网站外部推广福州专业的seo软件
  • 织梦网站如何做301跳转关键词搜索热度
  • 定制做网站技术免费推广网站排行榜
  • 网站建设logo四年级新闻摘抄大全
  • asp+sql server典型网站建设案例竞价推广怎么样
  • 做网站公司圣辉友联北京seo的排名优化
  • 做网站公司怎样苏州seo营销
  • 厦门有没有做网站的太原seo关键词优化
  • 网站建设的专业性对搜索引擎营销的影响广州外包网络推广公司
  • 动态网站的运作流程seo综合排名优化
  • 免费在线咨询软件杭州seo网站优化
  • 大陆怎么做香港网站宁波关键词网站排名
  • 化妆品网站建设描述网站页面的优化
  • 临沂网站建设和轶件安装产品互联网营销推广
  • 网站专题制作流程石家庄关键词优化平台
  • 常宁网页设计seo外包多少钱
  • 网站维护的主要内容常州谷歌优化
  • 网站怎样制作流程产品推广方案ppt模板
  • 青岛网站维护公司网站推广计划方案
  • 怎么破解别人做的付费网站你就知道
  • 仿织梦长沙网站公司百度怎么注册公司网站