Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Kong

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how to use Kong". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

technical terms

Route: The forwarding rule of the request, forwarding the request to Service according to Hostname and PATH;

Services: A collection of multiple Upstream, which is the forwarding target of Route;

Consumer: API user, record user information;

Plugin: Plugin can be global or bound to Service, Router or Consumer;

Certificate: https configured certificate;

Sni: binding of domain name and Certificate, specifying https certificate corresponding to a domain name;

Upstream: upstream object is used to represent virtual host name. When there are multiple services (targets), it will perform Load Balancer on requests;

Target: Backend service that ultimately processes the request.

Default listening port

8000: This port is used by Kong to listen for incoming HTTP requests from clients and forward the request to the server;(Kong forwards to the real backend service address according to the configured rules)

8443: This port is used by Kong to listen for incoming HTTPS requests from clients. It functions similarly to port 8000, forwarding HTTPS requests. It can be disabled by modifying the configuration file;

8001: Admin API. Through this port, administrators can configure Kong's monitoring service. Plug-in settings, API addition, deletion and modification, and Load Balancer are all managed through port 8001.

8444: This port allows administrators to monitor HTTPS requests.

service registry curl -i -X POST \--url http://localhost:8001/services/ \--data 'name=base64' \--data 'url=http://httpbin.org/base64' register routes curl -i -X POST --url http://localhost:8001/services/base64/routes --data 'hosts[]=127.0.0.1' --data 'paths[]=/base64'

test results

$ curl http://127.0.0.1:8000/base64/MTIzNDU2Nzg5123456789 Delete service $ curl -X Delete "http://localhost:8001/services/kong""How to use Kong" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report