In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "Cloudfoundry Grouter source code analysis". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "Cloudfoundry Grouter source code analysis" bar!
The main function of GoRouter source code analysis GoRouter is to accept the user's request information, query the routing information table maintained by GoRouter in memory according to the request URL, and then forward the URL to the specific component. GoRouter has several important components: Proxy, router, registry
Proxy: all external requests entering the Cloudfoundry need to go through proxy. Proxy looks for the corresponding node in the routing table according to the requested URL, and if the request header contains cookie, the node id is parsed, and the request distribution is routed to a specific node (for example, multiple DEA will route to a fixed DEA). If there is no cookie, a DEA is selected according to the routing algorithm, and the response cookie is added to return the user. That is, sessionsticky.
Router: mainly defines a data structure of router, and some initialization processes, processes that have already been run (run method). Router will start a timer to query whether the droplet expires. If it expires, it will inform the registry mode to update the routing information.
Registry: handles routing information from DEA or components to GoRouter registered uri. Cloudfoundry communicates through NAT, and NAT communication uses a subscription / publish design model to communicate. When GoRouter starts, it will subscribe to NAT to register and unregister information (router.register/router.unregister). When other components publish router.register/router.unregister events, GoRouter will receive a subscription message and inform the registry module to update the routing table.
The flow chart for users to access GoRouter is as follows: User/LB is not a GoRouter component. Heartbeat detection is determined by adding "HTTP-Monitor/1.1" to the requested header file.
The startup flow chart of GoRouter is as follows:
At this point, I believe that everyone on the "Cloudfoundry Grouter source code analysis" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.