diff --git a/404.html b/404.html index 633c40b8a2..8dd54c727c 100644 --- a/404.html +++ b/404.html @@ -33,7 +33,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - + 跳转到内容
铭师堂的云原生升级实践点此了解
插件

\u672A\u6765\u7684RoadMap\uFF0CHigress\u4F1A\u805A\u7126\u5728Gateway API/\u63D2\u4EF6\u751F\u6001/API\u7BA1\u7406\u4E09\u4E2A\u65B9\u5411\u4E0A\uFF0C\u968F\u7740\u793E\u533A\u5F00\u53D1\u56E2\u961F\u7684\u4E0D\u65AD\u58EE\u5927\uFF0CHigress\u5DF2\u7ECF\u5EFA\u7ACB\u4E86\u591A\u4E2A\u4E0D\u540C\u65B9\u5411\u7684SIG \u5E76\u884C\u63A8\u8FDB\u6838\u5FC3\u529F\u80FD\u6F14\u8FDB\uFF0C\u672A\u6765\u5C06\u4E0D\u65AD\u6709\u91CD\u91CF\u7EA7\u529F\u80FD\u63A8\u51FA\uFF0C\u5C3D\u8BF7\u671F\u5F85\u3002

+

\u76F4\u64AD\u56DE\u770B

+

https://www.aliyun.com/activity/middleware/CloudNative_Meetup

`,i={title:"Higress\u57282023 KubeCon China\u7684\u5206\u4EAB",keywords:["Higress","KubeCon"],description:"\u770BK8s\u8D44\u6DF1\u8FD0\u7EF4\u5982\u4F55\u9009\u578BIngress\u7F51\u5173",author:"\u6F84\u6F6D",date:"2023-09-28",category:"event"},r="/home/runner/work/higress-group.github.io/higress-group.github.io/src/content/blog/2023-kubecon.md",g=void 0,p=function(){return` +## \u5206\u4EAB\u7B80\u4ECB + +\u57289\u670826\u65E5\u76842023 KubeCon\u963F\u91CC\u4E91\u4E91\u539F\u751F\u5F00\u653E\u65E5\uFF0CHigress\u7684\u5206\u4EAB\u5185\u5BB9\u5206\u4E3A\u4E24\u90E8\u5206\uFF1A + +Part 1. \u7531\u4E0A\u6D77\u8D39\u82AE\u7F51\u7EDC\u79D1\u6280\u7CFB\u7EDF\u8FD0\u7EF4\u526F\u603B\u76D1\u6234\u559C\u519B\uFF0C\u5E26\u6765\u8D39\u82AE\u5728\u9009\u578B\u4F01\u4E1A\u7248Higress\u4F5C\u4E3AK8s Ingress\u66FF\u4EE3Nginx Ingress\u7684\u4ECB\u7ECD + +Part 2. \u7531Higress\u5F00\u6E90\u793E\u533A\u8D1F\u8D23\u4EBA\u6F84\u6F6D\uFF0C\u5E26\u6765Higress\u5F00\u6E90\u9879\u76EE\u7684\u4ECB\u7ECD + +\u5F00\u6E90\u7248\u548C\u4F01\u4E1A\u7248\u662FHigress\u7684\u4E00\u4F53\u4E24\u9762\uFF0C\u901A\u8FC7\u672C\u6B21\u5206\u4EAB\uFF0C\u76F8\u4FE1\u5927\u5BB6\u4F1A\u5BF9Higress\u6709\u66F4\u5168\u9762\u7684\u4E86\u89E3\u3002 + +## Part 1. \u8D39\u82AE\u4E92\u52A8\u4F7F\u7528Higress\u4F5C\u4E3AKubernetes Ingress\u5B9E\u73B0\u7A33\u5B9A\u6027\u548C\u6027\u80FD\u63D0\u5347 + +\u8D39\u82AE\u901A\u8FC7Higress\u89E3\u51B3\u4E86\u539F\u672CNginx Ingress\u7F51\u5173\u7684\u8BF8\u591A\u75DB\u70B9\uFF0C\u6027\u80FD\u63D0\u534790%\uFF0C\u54CD\u5E94\u65F6\u95F4\u4E0B\u964D50%\uFF0C\u5E76\u5927\u5E45\u63D0\u5347\u4E1A\u52A1\u5165\u53E3\u7684\u7A33\u5B9A\u53CA\u5B89\u5168\u6027\uFF0C\u9AD8\u6548\u652F\u6491\u6BCF\u65E51\u4EBF+\u7C89\u4E1D\u4EA4\u4E92\uFF0C 4\u4E07+\u7EBF\u4E0B\u95E8\u5E97\u3001\u6BCF\u67083000\u4E07+\u7B14\u7684\u79FB\u52A8\u652F\u4ED8\u9700\u6C42\u3002 + +### \u8D39\u82AE\u4E1A\u52A1\u573A\u666F + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/0d4f761d-1471-49b6-a03c-38b11304262d) +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/dba8ae2a-93c8-4368-af3d-739f97090d39) + +\u8D39\u82AE\u4E13\u6CE8\u4E8E\u79FB\u52A8\u8425\u9500\u3001O2O\u3001\u793E\u4EA4\u5A92\u4F53\u3001\u79FB\u52A8\u7535\u5546\u9886\u57DF\u7684\u521B\u65B0\u4E0E\u7814\u53D1\u3002\u8D39\u82AE\u4E92\u52A8\u81EA\u4E3B\u7814\u53D1\u7684\u81EA\u5A92\u4F53\u5E73\u53F0\u8FD0\u7EF4\u8D85\u8FC72\u4EBF\u7C89\u4E1D \uFF1B \u6709\u8D85\u8FC74\u4E07\u5BB6\u7EBF\u4E0B\u95E8\u5E97\u91C7\u7528\u8D39\u82AEO2O\u89E3\u51B3\u65B9\u6848\u3002\u8D39\u82AE\u7684\u4E3B\u8981\u5BA2\u6237\u5305\u62EC\u4F18\u8863\u5E93\uFF0C\u5FC5\u80DC\u5BA2\uFF0C\u80AF\u5FB7\u57FA\uFF0C\u661F\u5DF4\u514B\uFF0CSPG\uFF0C\u6B27\u83B1\u96C5\uFF0CInnisfree\uFF0C\u8FEA\u5361\u4FAC\uFF0C\u9876\u65B0\u96C6\u56E2\u7B49\u3002 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/61791bae-b40c-4b90-bc4d-c23bc052911c) + +\u8D39\u82AE\u5185\u90E8\u4E1A\u52A1\u7CFB\u7EDF\u7684\u65E5\u5747\u53D1\u5E03\u6B21\u6570\u8FBE\u5230100\u6B21\u4E4B\u591A\uFF0C\u4F1A\u6D89\u53CA\u5230400\u591A\u6761Ingress\u8DEF\u7531\u89C4\u5219\u7684\u65E5\u5E38\u66F4\u65B0\uFF0C\u4E14\u7F51\u5173\u6BCF\u5929\u9700\u8981\u627F\u8F7D\u7684PV\u6D41\u91CF\u8FBE\u5230\u4E861\u4E2A\u4EBF\u3002Ingress\u7F51\u5173\u7684\u6027\u80FD\u548C\u7A33\u5B9A\u6027\u81F3\u5173\u91CD\u8981\u3002 + +### Nginx Ingress \u75DB\u70B9 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/1d8a178e-05de-4114-96b3-7d4e11240374) + +\u914D\u7F6E\u53D8\u66F4\u9891\u7E41\uFF0C\u5BFC\u81F4Nginx\u8FDB\u7A0B\u9891\u7E41\u91CD\u542F\uFF0C\u5927\u91CF\u8FDE\u63A5\u77AC\u65F6\u65AD\u5F00\u540E\u5E76\u53D1\u91CD\u8FDE\u4F1A\u5BFC\u81F4\u540E\u7AEF\u670D\u52A1\u4EA7\u751F\u538B\u529B\uFF0C\u4E25\u91CD\u65F6\u9020\u6210\u5927\u91CF\u8BF7\u6C42\u5931\u8D25\u3002 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/52e6ff5a-7374-4fe9-b001-ff6d3ac97744) + +Nginx Ingress\u7684Controller\u7EC4\u4EF6\u548CNginx\u7EC4\u4EF6\u8FD0\u884C\u5728\u540C\u4E00\u4E2APOD\u4E2D\uFF0C\u63A7\u5236\u9762\u8D44\u6E90\u4F7F\u7528\u8FD8\u4F1A\u5F71\u54CD\u5230\u6570\u636E\u9762\u7684\u6027\u80FD\u3002 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/b09a3db4-465b-46b8-8e35-bd274388f143) + +Nginx Ingress\u8FD8\u7F3A\u5C11\u9762\u5411\u670D\u52A1\u9650\u6D41\u7684\u80FD\u529B\uFF0C\u53EA\u80FD\u5B9E\u73B0\u9762\u5411\u5355\u4E2A\u6765\u6E90IP\u9650\u6D41\uFF0C\u5BF9\u4E8E\u540E\u7AEF\u670D\u52A1\u4FDD\u62A4\u6765\u8BF4\u6CA1\u6709\u610F\u4E49\u3002 + +### Higress \u6536\u76CA + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/48388f01-7796-4f7d-b7d1-fb7bd1522925) + +Higress\u4F01\u4E1A\u7248\u91C7\u7528\u4E86\u5168\u6258\u7BA1\u67B6\u6784\uFF0C\u4E0E\u4E1A\u52A1\u96C6\u7FA4\u5206\u79BB\uFF0C\u65E0\u9700\u81EA\u5DF1\u8FD0\u7EF4\uFF0C\u7A33\u5B9A\u6027\u6709\u66F4\u597D\u4FDD\u969C\u3002 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/5e689364-fb08-4ec1-9d71-49539da561b8) + +\u914D\u7F6E\u66F4\u65B0\u90FD\u662F\u52A8\u6001\u52A0\u8F7D\uFF0C\u65E0\u9700\u91CD\u542F\u6570\u636E\u9762\uFF0C\u4FDD\u969C\u4E1A\u52A1\u5E73\u7A33\u53D1\u5E03\uFF0Cwebsocket\u8FDE\u63A5\u7684\u4E1A\u52A1\u6536\u76CA\u4E5F\u7279\u522B\u660E\u663E\uFF0C\u957F\u8FDE\u63A5\u53EF\u4EE5\u59CB\u7EC8\u4FDD\u6301\u4E0D\u4F1A\u65AD\u5F00\u3002 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/29ae8168-e84d-41fb-bb4f-a258c4200a7e) + +\u5F00\u542F\u4E86TLS\u786C\u4EF6\u52A0\u901F\uFF0CTLS\u63E1\u624B\u65F6\u5EF6\u76F4\u63A5\u51CF\u534A\uFF0CQPS\u541E\u5410\u63D0\u534786%\u3002 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/4ace2996-5b5a-4331-90cb-8448c65042d5) + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/8664f436-c058-42bc-82c9-7355d24592ad) + +\u5F00\u542FWAF\u5BF9\u541E\u5410\u5F71\u54CD\u8FD8\u662F\u6BD4\u8F83\u660E\u663E\u7684\uFF0C\u4E0B\u964D\u4E8630%\uFF0C\u4F46\u76F8\u6BD4Ingress Nginx\u76F4\u63A5\u4E0B\u964D\u4E8690%\uFF0C\u6027\u80FD\u63D0\u5347\u8FD8\u662F\u5F88\u660E\u663E\uFF0C\u800C\u4E14\u66F4\u5927\u7684\u4F18\u52BF\u662F\u57FA\u4E8E\u963F\u91CC\u4E91WAF\u4EA7\u54C1\uFF0C\u9632\u62A4\u89C4\u5219\u662F\u5B9E\u65F6\u66F4\u65B0\u7684\uFF0C\u800C\u975EModsecurity\u7684\u9759\u6001\u89C4\u5219\u3002 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/10fca63d-a0bb-45a1-82ee-de115bf577e7) + +Higress\u96C6\u6210\u4E86Sentinel\u9650\u6D41\u7684\u80FD\u529B\uFF0C\u53EF\u4EE5\u76F4\u63A5\u9762\u5411\u670D\u52A1\u7684QPS\u541E\u5410\u4E0A\u9650/\u5E76\u53D1\u6570\u4E0A\u7EBF\u8FDB\u884C\u9650\u6D41\uFF0C\u5E76\u4E14\u76F8\u6BD4Nginx\u53EA\u80FD\u914D\u7F6E\u5355\u673A\u9650\u5236\u9608\u503C\uFF0C\u9700\u8981\u5173\u6CE8\u7F51\u5173\u8282\u70B9\u6570\u91CF\uFF0CHigress\u8FD9\u91CC\u7684\u914D\u7F6E\u662F\u5168\u5C40\u9608\u503C\uFF0C\u4E0D\u53D7\u7F51\u5173\u6269\u7F29\u5BB9\u5F71\u54CD\u3002 + +\u89E6\u53D1\u9650\u6D41\u540E\u53EF\u4EE5\u81EA\u5B9A\u4E49\u54CD\u5E94\u5185\u5BB9\u6216\u8005\u91CD\u5B9A\u5411\u5230\u6307\u5B9A\u5730\u5740\uFF0C\u90FD\u662F\u5F88\u5B9E\u7528\u7684\u80FD\u529B\u3002 + +## Part 2. Higress\u5F00\u6E90\u4E4B\u8DEF\uFF1A\u624E\u6839\u5F00\u6E90\u751F\u6001\uFF0C\u5B9A\u4E49\u4E91\u539F\u751F\u7F51\u5173 + +\u5F00\u6E90\u662F\u4E91\u539F\u751F\u751F\u6001\u7684\u57FA\u77F3\uFF0CHigress\u4E5F\u662F\u501F\u52A9\u4E86\u5F00\u6E90\u751F\u6001\u7684\u529B\u91CF\uFF0C\u7AD9\u5728Istio/Envoy\u7684\u80A9\u8180\u4E0A\u5F00\u53D1\u51FA\u4E86\u66F4\u591A\u5B9E\u7528\u7684\u529F\u80FD\uFF0C\u6211\u4EEC\u9009\u62E9\u5C06MSE Higress\uFF08\u4F01\u4E1A\u7248\uFF09\u4E2D\u7684\u6838\u5FC3\u80FD\u529B\u5168\u90E8\u5F00\u6E90\uFF0C\u51B3\u5FC3\u624E\u6839\u5728\u5F00\u6E90\u751F\u6001\u4E2D\uFF0C\u8BA9Higress\u53D8\u5F97\u66F4\u666E\u60E0\uFF0C\u6709\u66F4\u591A\u4EBA\u4F7F\u7528\uFF0C\u4ECE\u800C\u8BA9Higress\u66F4\u52A0\u5F3A\u5927\u3002 + +### \u7B80\u4ECB + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/438dcf9a-96fa-4d0d-89ed-e810746c61ab) + +Higress\u5B9E\u9645\u4E0A\u6709\u4E09\u6B21\u8BDE\u751F\u8FC7\u7A0B\uFF1A\u7B2C\u4E00\u6B21\u662F\u5728\u963F\u91CC\u96C6\u56E2\u5185\u90E8\u4E1A\u52A1\u9700\u6C42\u9A71\u52A8\u4E0B\u8BDE\u751F\uFF1B\u7B2C\u4E8C\u6B21\u662F\u968F\u7740\u5185\u90E8\u4F7F\u7528\u9010\u6E10\u6210\u719F\u6C89\u6DC0\u4E3A\u963F\u91CC\u4E91\u4E0A\u7684MSE Higress\u4E91\u539F\u751F\u7F51\u5173\u4EA7\u54C1\uFF1B\u7B2C\u4E09\u6B21\u662F\u968F\u7740\u4E91\u4EA7\u54C1\u6210\u719F\uFF0C2022\u5E7411\u6708\u5728\u4E91\u6816\u5927\u4F1A\u4E0A\u6B63\u5F0F\u5BA3\u5E03\u5F00\u6E90\u30022023\u5E745\u6708Release\u4E86\u7B2C\u4E00\u4E2AGA\u7248\u672C\uFF0C\u610F\u5473\u7740\u5F00\u6E90\u7248\u672C\u4E5F\u8D70\u5165\u6210\u719F\u9636\u6BB5\u3002 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/783b96cc-b628-4784-a6cf-c2cf10e11f3f) + +\u4ECE\u914D\u7F6E\u6D41\u8F6C\u7684\u8FC7\u7A0B\u6765\u770BHigress\u7684\u67B6\u6784\uFF1A + +1. \u9996\u5148\u7528\u6237\u53EF\u4EE5\u901A\u8FC7UI\u63A7\u5236\u53F0/\u547D\u4EE4\u884C\u5DE5\u5177\u591A\u79CD\u65B9\u5F0F\u6765\u4E0B\u53D1\u914D\u7F6E +2. \u5230\u4E86\u63A7\u5236\u9762\uFF0C\u5982\u679C\u662FK8s\u4E0B\uFF0C\u914D\u7F6E\u6301\u4E45\u5316\u57FA\u4E8ECRD\uFF0C\u5982\u679C\u4E0D\u662FK8s\uFF0C\u914D\u7F6E\u6301\u4E45\u5316\u57FA\u4E8ENacos +3. \u9664\u4E86\u7528\u6237\u4E0B\u53D1\u7684\u8DEF\u7531\u914D\u7F6E\uFF0C\u5B9E\u73B0\u670D\u52A1\u8DEF\u7531\u8FD8\u9700\u8981\u7684\u670D\u52A1IP\u5730\u5740\u4FE1\u606F\uFF0C\u652F\u6301\u4ECEK8s service/Nacos/Eureka/Consul/ZooKeeper/DNS/\u56FA\u5B9AIP\u7B49\u591A\u79CD\u65B9\u5F0F\u83B7\u53D6 +4. Higress\u6570\u636E\u9762\u662F\u57FA\u4E8EEnvoy\uFF0C\u914D\u7F6E\u901A\u8FC7xDS\u4E0B\u53D1\uFF0C\u8FD9\u91CC\u590D\u7528\u4E86Istio\u7684\u914D\u7F6E\u4E0B\u53D1\u673A\u5236\uFF0C\u56E0\u4E3A\u662F\u5185\u7F6E\u4E86\u8FD9\u4E2A\u673A\u5236\uFF0C\u65E0\u9700\u5355\u72EC\u90E8\u7F72Istio +5. \u6700\u7EC8\u914D\u7F6E\u4E0B\u53D1\u5230\u6570\u636E\u9762\u751F\u6548\uFF0CHigress\u57FA\u4E8EEnvoy\u6269\u5C55\u4E86\u5F88\u591A\u80FD\u529B\uFF0C\u800C\u4E14\u57FA\u4E8EWasm\u6269\u5C55\u673A\u5236\uFF0C\u53EF\u4EE5\u5F88\u65B9\u4FBF\u5F00\u53D1\u81EA\u5B9A\u4E49\u63D2\u4EF6\uFF0C\u4E14\u5177\u5907\u5168\u5C40/\u57DF\u540D/\u8DEF\u7531\u7EF4\u5EA6\u7684\u751F\u6548\u7C92\u5EA6 + +### \u6838\u5FC3\u80FD\u529B + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/be02b599-f82f-42be-a8e5-82f69b9196b8) +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/4dc3cc2b-d6fe-4717-a53a-3e75c5f826ca) + +\u9AD8\u96C6\u6210\uFF1A\u540C\u65F6\u96C6\u6210\u7ECF\u5178\u5FAE\u670D\u52A1\u751F\u6001\u548CK8s\u5F00\u6E90\u751F\u6001\u80FD\u529B\uFF0C\u53EF\u4EE5\u5E2E\u52A9\u4E1A\u52A1\u4ECE\u4F20\u7EDF\u67B6\u6784\u8FC1\u79FB\u5230\u4E91\u539F\u751F\u67B6\u6784\uFF0C\u57FA\u4E8E\u6D41\u91CF\u7070\u5EA6\u7B49\u80FD\u529B\uFF0C\u53EF\u4EE5\u4FDD\u969C\u8FD9\u4E00\u8FC7\u7A0B\u7684\u5E73\u6ED1 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/87f8eacd-39b6-4a26-a7a1-b78f6a5abb4f) + +\u6807\u51C6\u5316\uFF1A\u517C\u5BB9Nginx Ingress\u5E38\u7528\u6CE8\u89E3\uFF0C\u57FA\u4E8E\u7EDF\u4E00\u7684Ingress\u6807\u51C6\u53EF\u4EE5\u8F7B\u677E\u5B9E\u73B0Nginx\u5230Higress\u8FD9\u4E00\u6280\u672F\u9E3F\u6C9F\u7684\u8DE8\u8D8A\uFF0CHigress\u4E5F\u5DF2\u7ECF\u652F\u6301Gateway API\uFF0C\u8DEF\u7531\u6807\u51C6\u672C\u8EAB\u4E5F\u80FD\u501F\u52A9Higress\u5B9E\u73B0\u5E73\u6ED1\u5347\u7EA7 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/33776d12-baf3-4d09-ae42-a5cadb655bef) + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/b9e4a718-c985-4ac4-9b7b-46a427ccb987) + + +\u6613\u6269\u5C55\uFF1A\u501F\u52A9Higress\u7684Wasm SDK\uFF0C\u5F88\u5C11\u7684\u4E1A\u52A1\u4EE3\u7801\u5C31\u53EF\u4EE5\u5F00\u53D1\u4E00\u4E2A\u7075\u6D3B\u7684\u63D2\u4EF6\uFF1B\u5E76\u4E14\u652F\u6301\u57FA\u4E8EOCI\u955C\u50CF\u6807\u51C6\u5206\u53D1\uFF0C\u53EF\u4EE5\u8BA9\u63D2\u4EF6\u7684\u6587\u6863\uFF0C\u914D\u7F6E\u7EA6\u675F\u7B49\u8DDF\u968F\u63D2\u4EF6\u672C\u8EAB\u4E00\u8D77\u88AB\u5206\u53D1\u548C\u5171\u4EAB\uFF1B\u548C\u4F20\u7EDFNginx\u7C7B\u7F51\u5173\u6700\u5927\u7684\u5DEE\u522B\uFF0C\u5728\u4E8E\u63D2\u4EF6\u7684\u5206\u53D1\u96C6\u6210\u9636\u6BB5\uFF0C\u5B9E\u73B0\u4E86\u63D2\u4EF6\u7248\u672C\u66F4\u65B0\u8DDF\u7F51\u5173\u81EA\u8EAB\u7248\u672C\u66F4\u65B0\u7684\u89E3\u8026\u3002 + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/d037bd1d-89c1-4f9c-b489-857b46de31ca) + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/65f71cee-09d9-4e7b-aa6e-bd4c9a60de83) + +\u70ED\u66F4\u65B0\uFF1AEnvoy\u76F8\u6BD4Nginx\u66F4\u5408\u7406\u7684\u914D\u7F6E\u7CFB\u7EDF\u62BD\u8C61\uFF0C\u8BA9Higress\u5177\u5907\u4E86Nginx Ingress\u65E0\u6CD5\u5B9E\u73B0\u7684\u914D\u7F6E\u70ED\u66F4\u65B0\u80FD\u529B + +### \u56DE\u987E\u4E0E\u5C55\u671B + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/f46c4d68-8e31-44bb-afc6-c02c9fccb105) + +Higress\u5F00\u6E90\u7684\u524D\u534A\u5E74\uFF0C\u4E13\u6CE8\u4E8E\u5F00\u6E90\u751F\u6001\u7684\u6253\u901A\u548C\u6613\u7528\u6027\u7684\u63D0\u5347\uFF0C\u5E76\u57FA\u4E8EGithub Action\u6784\u5EFA\u4E86\u5F00\u6E90\u7684\u96C6\u6210\u6D4B\u8BD5\u4F53\u7CFB\uFF0C\u6765\u4FDD\u969C\u9879\u76EE\u8D28\u91CF\uFF0C\u5728\u4ECA\u5E745\u6708\u4EFD\u53D1\u5E03\u7B2C\u4E00\u4E2AGA\u7A33\u5B9A\u7248\u672C\u540E\uFF0C\u5728\u591A\u4E2A\u6838\u5FC3\u793E\u533A\u5F00\u53D1\u8005\u7684\u52AA\u529B\u4E0B\uFF0C\u6211\u4EEC\u53C8\u5F88\u5FEB\u53D1\u5E03\u4E861.1\u548C1.2\u4E24\u4E2A\u5927\u7248\u672C\uFF0C\u63A8\u51FA\u4E86\u975EK8s\u90E8\u7F72/Knative\u652F\u6301\u7B49\u91CD\u91CF\u7EA7\u529F\u80FD\u3002 + + +![image](https://github.com/higress-group/higress-group.github.io/assets/6763318/3ba10a71-b3f0-4ede-a150-c64e0b1003c4) + +\u672A\u6765\u7684RoadMap\uFF0CHigress\u4F1A\u805A\u7126\u5728Gateway API/\u63D2\u4EF6\u751F\u6001/API\u7BA1\u7406\u4E09\u4E2A\u65B9\u5411\u4E0A\uFF0C\u968F\u7740\u793E\u533A\u5F00\u53D1\u56E2\u961F\u7684\u4E0D\u65AD\u58EE\u5927\uFF0CHigress\u5DF2\u7ECF\u5EFA\u7ACB\u4E86\u591A\u4E2A\u4E0D\u540C\u65B9\u5411\u7684[SIG](https://github.com/alibaba/higress/issues/547) \u5E76\u884C\u63A8\u8FDB\u6838\u5FC3\u529F\u80FD\u6F14\u8FDB\uFF0C\u672A\u6765\u5C06\u4E0D\u65AD\u6709\u91CD\u91CF\u7EA7\u529F\u80FD\u63A8\u51FA\uFF0C\u5C3D\u8BF7\u671F\u5F85\u3002 + + +## \u76F4\u64AD\u56DE\u770B + +https://www.aliyun.com/activity/middleware/CloudNative_Meetup + + + + + + + +`},o=function(){return s},a=function(){return[{depth:2,slug:"\u5206\u4EAB\u7B80\u4ECB",text:"\u5206\u4EAB\u7B80\u4ECB"},{depth:2,slug:"part-1-\u8D39\u82AE\u4E92\u52A8\u4F7F\u7528higress\u4F5C\u4E3Akubernetes-ingress\u5B9E\u73B0\u7A33\u5B9A\u6027\u548C\u6027\u80FD\u63D0\u5347",text:"Part 1. \u8D39\u82AE\u4E92\u52A8\u4F7F\u7528Higress\u4F5C\u4E3AKubernetes Ingress\u5B9E\u73B0\u7A33\u5B9A\u6027\u548C\u6027\u80FD\u63D0\u5347"},{depth:3,slug:"\u8D39\u82AE\u4E1A\u52A1\u573A\u666F",text:"\u8D39\u82AE\u4E1A\u52A1\u573A\u666F"},{depth:3,slug:"nginx-ingress-\u75DB\u70B9",text:"Nginx Ingress \u75DB\u70B9"},{depth:3,slug:"higress-\u6536\u76CA",text:"Higress \u6536\u76CA"},{depth:2,slug:"part-2-higress\u5F00\u6E90\u4E4B\u8DEF\u624E\u6839\u5F00\u6E90\u751F\u6001\u5B9A\u4E49\u4E91\u539F\u751F\u7F51\u5173",text:"Part 2. Higress\u5F00\u6E90\u4E4B\u8DEF\uFF1A\u624E\u6839\u5F00\u6E90\u751F\u6001\uFF0C\u5B9A\u4E49\u4E91\u539F\u751F\u7F51\u5173"},{depth:3,slug:"\u7B80\u4ECB",text:"\u7B80\u4ECB"},{depth:3,slug:"\u6838\u5FC3\u80FD\u529B",text:"\u6838\u5FC3\u80FD\u529B"},{depth:3,slug:"\u56DE\u987E\u4E0E\u5C55\u671B",text:"\u56DE\u987E\u4E0E\u5C55\u671B"},{depth:2,slug:"\u76F4\u64AD\u56DE\u770B",text:"\u76F4\u64AD\u56DE\u770B"}]},e=h((l,H,I)=>{const{layout:y,...t}=i;return t.file=r,t.url=g,b`${c()}${n(s)}`})});export{e as Content,d as __tla,o as compiledContent,e as default,r as file,i as frontmatter,a as getHeadings,p as rawContent,g as url}; diff --git a/_astro/30-line-wasm.B4sIiA1H.js b/_astro/30-line-wasm.B4sIiA1H.js new file mode 100644 index 0000000000..d6f3fa45f0 --- /dev/null +++ b/_astro/30-line-wasm.B4sIiA1H.js @@ -0,0 +1,426 @@ +import{c,__tla as d}from"./astro-component.CXlaF79K.js";import{r,m as g,u,__tla as y}from"./constant.0hiB-u02.js";import{__tla as v}from"./astro/assets-service.DQopRnBr.js";let e,t,a,n,p,o,i,m=Promise.all([(()=>{try{return d}catch{}})(),(()=>{try{return y}catch{}})(),(()=>{try{return v}catch{}})()]).then(async()=>{let s;s=`

\u524D\u8A00

+

\u572811\u670815\u53F7\u7684\u76F4\u64AD \u300AHigress \u5F00\u6E90\u80CC\u540E\u7684\u53D1\u5C55\u5386\u7A0B\u548C\u4E0A\u624B Demo \u6F14\u793A\u300B\u4E2D\uFF0C\u4E3A\u5927\u5BB6\u6F14\u793A\u4E86 Higress \u7684 Wasm \u63D2\u4EF6\u5982\u4F55\u9762\u5411 Ingress \u8D44\u6E90\u8FDB\u884C\u914D\u7F6E\u751F\u6548\uFF0C\u672C\u6587\u5BF9\u5F53\u5929\u7684 Demo \u8FDB\u884C\u4E00\u4E2A\u56DE\u987E\uFF0C\u5E76\u8BF4\u660E\u80CC\u540E\u7684\u539F\u7406\u673A\u5236\u3002

+ +

\u672C\u6587\u4E2D Demo \u8FD0\u884C\u7684\u524D\u63D0\uFF0C\u9700\u8981\u5728 K8s \u96C6\u7FA4\u4E2D\u5B89\u88C5\u4E86 Higress\uFF0C\u5E76\u751F\u6548\u4E86\u4E0B\u9762\u8FD9\u4EFD quickstart \u914D\u7F6E\uFF1A +https://higress.cn/samples/quickstart.yaml +\u8FD9\u4E2A Demo \u8981\u5B9E\u73B0\u7684\u529F\u80FD\u662F\u4E00\u4E2A Mock \u5E94\u7B54\u7684\u529F\u80FD\uFF0C\u9700\u8981\u5B9E\u73B0\u6839\u636E\u914D\u7F6E\u7684\u5185\u5BB9\uFF0C\u8FD4\u56DE HTTP \u5E94\u7B54\u3002 +\u672C\u6587\u4F1A\u6309\u4EE5\u4E0B\u65B9\u5F0F\u8FDB\u884C\u4ECB\u7ECD\uFF1A

+
    +
  • \u7F16\u5199\u4EE3\u7801\uFF1A\u4EE3\u7801\u903B\u8F91\u89E3\u6790
  • +
  • \u751F\u6548\u63D2\u4EF6\uFF1A\u8BF4\u660E\u4EE3\u7801\u5982\u4F55\u8FDB\u884C\u7F16\u8BD1\u6253\u5305\u5E76\u90E8\u7F72\u751F\u6548
  • +
  • \u6D4B\u8BD5\u63D2\u4EF6\u529F\u80FD\uFF1A\u8BF4\u660E\u5168\u5C40\u7C92\u5EA6\uFF0C\u8DEF\u7531/\u57DF\u540D\u7EA7\u7C92\u5EA6\u5982\u4F55\u751F\u6548
  • +
  • \u63D2\u4EF6\u751F\u6548\u539F\u7406\uFF1A\u5BF9\u6574\u4F53\u6D41\u7A0B\u8FDB\u884C\u56DE\u987E\uFF0C\u8BF4\u660E\u63D2\u4EF6\u751F\u6548\u7684\u539F\u7406
  • +
  • \u4E09\u4E2A\u9769\u547D\u6027\u7684\u7279\u6027\uFF1A\u4ECB\u7ECD Wasm \u63D2\u4EF6\u673A\u5236\u4E3A\u7F51\u5173\u63D2\u4EF6\u5F00\u53D1\u5E26\u6765\u7684\u53D8\u9769
  • +
+

\u7F16\u5199\u4EE3\u7801

+
+
铭师堂的云原生升级实践点此了解
关于 Higress
Higress 优势对比 -
帮您选择更合适的网关
产品对比

Higress

Higress 遵循开源 Ingress/Gateway API 标准,是提供流量调度、服务治理、安全防护三合一的云原生 API 网关,具有高集成、易使用、易扩展、热更新等特点,并能满足 AI 场景下对网关的新需求。

Nginx

Nginx 是用于 Web 服务、反向代理、内容缓存、负载均衡、媒体流传输等场景的开源软件,还可以作为 API 网关,通过反向代理将用户请求转发到后端业务模块,从而为第三方提供服务接口。

Spring Cloud Gateway

Spring Cloud Gateway 为微服务架构提供一种简单而有效的统一的 API 路由管理方式,并基于 Filter 链的方式提供了安全、监控和埋点、限流等能力。
基础架构

内核

基于 Envoy 和 Istio 实现的云原生 API 网关

独立的高性能服务器软件

基于 Spring Framework 的微服务网关

架构

流量网关、微服务网关、安全网关三合一

(缩短网关转化链路、降低故障排查难度)

流量网关

微服务网关

遵循 Ingress 标准,提供标准化的扩展机制

基于 Ingress Nginx

暂未见公开的支持计划

遵循 Gateway API 标准

基于 Ingress Nginx,有支持计划

暂未见公开的支持计划

AI 特性

AI 代理插件

暂未见公开的相关能力

暂未见公开的相关能力

AI 内容审核插件

暂未见公开的相关能力

暂未见公开的相关能力

AI 统计插件

暂未见公开的相关能力

暂未见公开的相关能力

AI 限流插件

暂未见公开的相关能力

暂未见公开的相关能力

AI 开发插件集

暂未见公开的相关能力

暂未见公开的相关能力

云原生特性

无损变更

通常不直接集成服务发现,需要配合其他组件

暂未见相关能力

支持 Nacos、K8s Service 等多种注册中心

通常不直接集成服务发现,需要配合其他组件

暂未见相关能力

限流防护

支持 Header/URL 参数/IP 粒度的全局统一限流

有较高的集成开发成本

通常不直接集成服务发现,需要配合其他组件

HTTP 转 Dubbo 协议

暂未见公开的相关能力

暂未见公开的相关能力

可观测(metrics/logging/tracing)

开箱即用

需自行搭建

需自行搭建

极简部署

不依赖 K8s,Docker 容器即可启动

性能

超大规模路由配置性能优化

10000 个路由,生效时间3秒

Ingress Nginx 为例,10000个路由,生效时间1分钟

暂未见公开的优化能力

CPU/内存成本优化

对比 Ingress Nginx,CPU 成本节省50%,内存成本节省90%

暂未见公开的优化能力

暂未见公开的优化能力

扩展性

Lua

通过 Java 编程模型进行扩展

WASM

暂未见公开的支持计划

通过 Java 编程模型进行扩展

热更新

需要 reload

需要重启网关

安全性

IP 黑白名单

消费者认证鉴权

(key-auth/hmac-auth/jwt-auth等)

需要额外配置安全模块

支持安全特性,但需要额外配置

自建服务鉴权

需要额外配置安全模块

支持安全特性,但需要额外配置

OIDC 认证

需要额外配置安全模块

支持安全特性,但需要额外配置

WAF 防护

需要额外配置安全模块

支持安全特性,但需要额外配置

基础架构
AI 特性
云原生特性
性能
扩展性
安全性
产品对比

Higress

Higress 遵循开源 Ingress/Gateway API 标准,是提供流量调度、服务治理、安全防护三合一的云原生 API 网关,具有高集成、易使用、易扩展、热更新等特点,并能满足 AI 场景下对网关的新需求。

Nginx

Nginx 是用于 Web 服务、反向代理、内容缓存、负载均衡、媒体流传输等场景的开源软件,还可以作为 API 网关,通过反向代理将用户请求转发到后端业务模块,从而为第三方提供服务接口。

Spring Cloud Gateway

Spring Cloud Gateway 为微服务架构提供一种简单而有效的统一的 API 路由管理方式,并基于 Filter 链的方式提供了安全、监控和埋点、限流等能力。
基础架构

内核

基于 Envoy 和 Istio 实现的云原生 API 网关

独立的高性能服务器软件

基于 Spring Framework 的微服务网关

架构

流量网关、微服务网关、安全网关三合一

(缩短网关转化链路、降低故障排查难度)

流量网关

微服务网关

遵循 Ingress 标准,提供标准化的扩展机制

基于 Ingress Nginx

暂未见公开的支持计划

遵循 Gateway API 标准

基于 Ingress Nginx,有支持计划

暂未见公开的支持计划

AI 特性

AI 代理插件

暂未见公开的相关能力

暂未见公开的相关能力

AI 内容审核插件

暂未见公开的相关能力

暂未见公开的相关能力

AI 统计插件

暂未见公开的相关能力

暂未见公开的相关能力

AI 限流插件

暂未见公开的相关能力

暂未见公开的相关能力

AI 开发插件集

暂未见公开的相关能力

暂未见公开的相关能力

云原生特性

无损变更

通常不直接集成服务发现,需要配合其他组件

暂未见相关能力

支持 Nacos、K8s Service 等多种注册中心

通常不直接集成服务发现,需要配合其他组件

暂未见相关能力

限流防护

支持 Header/URL 参数/IP 粒度的全局统一限流

有较高的集成开发成本

通常不直接集成服务发现,需要配合其他组件

HTTP 转 Dubbo 协议

暂未见公开的相关能力

暂未见公开的相关能力

可观测(metrics/logging/tracing)

开箱即用

需自行搭建

需自行搭建

极简部署

不依赖 K8s,Docker 容器即可启动

性能

超大规模路由配置性能优化

10000 个路由,生效时间3秒

Ingress Nginx 为例,10000个路由,生效时间1分钟

暂未见公开的优化能力

CPU/内存成本优化

对比 Ingress Nginx,CPU 成本节省50%,内存成本节省90%

暂未见公开的优化能力

暂未见公开的优化能力

扩展性

Lua

通过 Java 编程模型进行扩展

WASM

暂未见公开的支持计划

通过 Java 编程模型进行扩展

热更新

需要 reload

需要重启网关

安全性

IP 黑白名单

消费者认证鉴权

(key-auth/hmac-auth/jwt-auth等)

需要额外配置安全模块

支持安全特性,但需要额外配置

自建服务鉴权

需要额外配置安全模块

支持安全特性,但需要额外配置

OIDC 认证

需要额外配置安全模块

支持安全特性,但需要额外配置

WAF 防护

需要额外配置安全模块

支持安全特性,但需要额外配置

基础架构
AI 特性
云原生特性
性能
扩展性
安全性

友情链接: diff --git a/blog/2/index.html b/blog/2/index.html index bf3bab9eb3..42951bc694 100644 --- a/blog/2/index.html +++ b/blog/2/index.html @@ -8,7 +8,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +

铭师堂的云原生升级实践点此了解
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件

活动回顾丨云原生开源开发者沙龙,AI 应用工程化专场

发布时间 2024-11-12


+ astro-bxjx6km4" data-on="EN" data-off="中文">
中文

活动回顾丨云原生开源开发者沙龙,AI 应用工程化专场

发布时间 2024-11-12


11 月 08 日,云原生开源开发者沙龙丨AI 应用工程化专场在杭州顺利举办。现场座无虚席,阿里云一线工程师围绕《构建面向 AI 应用可观测能力》、《Java 开发者如何玩转 AI》、《事件驱动构建 AI 原生应用》、《智启未来:通过 AI 网关快速构建智能应用》4 个当下热门议题深入分享,讲师们的精彩演讲引发了现场开发者的强烈共鸣,并积极参与提问和讨论,现场互动氛围十分热烈。活动最后,现场开发者还通过实操环节进一步巩固了所学知识,整个活动充实而富有成效。点击文末阅读原文课可预约沙龙回放视频。

-

+

点击此处可免费获得杭州站讲师 PPT 合辑

一、精彩回顾

下面就让我们一起回顾本次活动上都有哪些精彩瞬间。

分享主题丨构建面向 AI 应用可观测能力

在当前生成式 AI 热度持续上升的背景下,大模型领域的快速发展不仅催生了新的职业机会,也对系统的可观测性提出了更高要求。阿里云高级技术专家夏明首先概述了从微服务架构向 AI 应用转变过程中所经历的应用模式和技术栈的变化,强调了在这种转型中提升可观测性的重要性及其面临的挑战与需求。接着深入探讨了如何为大模型应用场景设计并实现有效的可观测解决方案,包括具体的设计思路、实施方案以及取得的实际成效。最后分享了对未来发展趋势的看法及团队下一步的工作计划,帮助开发者了解轻松驾驭 AI 应用。

-

+

分享主题丨Java 开发者如何玩转 AI

Spring AI Alibaba 是基于 Spring AI 构建的 AI 应用框架,它利用 Spring Boot 的便捷性与模块化特性,简化了开发者在集成 AI 能力时的操作流程,还支持一次编码即可轻松切换不同的 AI 服务提供商,让 Java 开发者能够快速接入先进的 AI 技术。本次分享 Spring Cloud Alibaba & Spring AI Alibaba 发起人肖京介绍了 Java 开发者可以如何利用阿里巴巴开源的 AI 框架来开发AI应用,以及该框架在微服务领域的应用和最佳实践,并介绍阿里巴巴开源项目的背景、核心功能和实操案例,强调通过参与开源项目来提升个人技能和职业生涯发展的潜力。

-

+

分享主题丨事件驱动构建 AI 原生应用

AI 应用在进行商业化服务的阶段会面临诸多挑战,比如更快的服务交付速度,更精准实时的结果以及更人性化的体验等,传统架构限制于同步交互,无法满足上述需求,本次分享阿里云技术专家王庆给大家介绍一下如何基于事件驱动架构应对上述挑战。

-

+

分享主题丨智启未来:通过 AI 网关快速构建智能应用

网关随着业务形态的变化在持续演进,在 AI 浪潮下 AI 网关应需而生,AI 网关通过集成 AI Prompt Template、AI Proxy、AI 语义缓存、AI 内容安全、AI 意图识别、RAG 等多种技术,开发者只需通过简单配置即可实现AI应用开发、模型训练等。无论是智能客服、推荐系统,还是数据分析,AI 网关都能为企业提供灵活、强大的支持,助力业务快速发展。本次分享 Higress 网关负责人耿蕾蕾介绍了 AI 网关如何促进智能应用的快速构建,并讨论了云原生网关和 AI 网关的发展趋势。

-

+

二、现场照片

-

-

-

-

+

+

+

+

欢迎使用钉钉扫描二维码

加入本次活动群

群号:94560019909

\ No newline at end of file diff --git a/blog/higress-gvr7dx_awbbpb_axu7ixyuxqtsbh9v/index.html b/blog/higress-gvr7dx_awbbpb_axu7ixyuxqtsbh9v/index.html index ca91adb1c8..c8a266de7b 100644 --- a/blog/higress-gvr7dx_awbbpb_axu7ixyuxqtsbh9v/index.html +++ b/blog/higress-gvr7dx_awbbpb_axu7ixyuxqtsbh9v/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
铭师堂的云原生升级实践点此了解

Higress x Kubesphere 开源沙龙广州站邀您参会

发布时间 2024-12-20


欢迎莅临广州市海珠区鼎新路88号广州阿里中心,O-N-10-02 春秋书院。报名成功后,您将在活动前一周收到短信通知。

-

+

一、活动简介

AI 驱动的应用程序开发、部署和运维,给应用带来了新的生命力和想象空间。但大部分开发者对 AI 应用的编程框架、可观测体系、网关架构的设计和使用依旧不太熟练,生产环境下的工程化实践仍不太丰富。为此我们邀请了深耕 AI 应用工程化的一线研发工程师,分享他们的生产经验,以及 Spring AI Alibaba 和 Higress 等开源项目的最新进展,并通过现场实操加固学习效果。本次活动因场地限制,采取报名审核制度。

二、详细议程

-

\ No newline at end of file +

\ No newline at end of file diff --git a/blog/higress-gvr7dx_awbbpb_bffdbqhfb8r0qih8/index.html b/blog/higress-gvr7dx_awbbpb_bffdbqhfb8r0qih8/index.html index 99c8e90fa9..cc655283c4 100644 --- a/blog/higress-gvr7dx_awbbpb_bffdbqhfb8r0qih8/index.html +++ b/blog/higress-gvr7dx_awbbpb_bffdbqhfb8r0qih8/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
铭师堂的云原生升级实践点此了解

Higress x Kubesphere 开源沙龙成都站邀您参会

发布时间 2024-11-14


AI 驱动的应用程序开发、部署和运维,给应用带来了新的生命力和想象空间。但大部分开发者对 AI 应用的编程框架、可观测体系、网关架构的设计和使用依旧不太熟练,生产环境下的工程化实践仍不太丰富。为此,Higress 联合 Kubesphere 邀请了深耕 AI 应用工程化的一线研发工程师,分享他们的生产经验。本次活动因场地限制,采取报名审核制度。

-

\ No newline at end of file +

\ No newline at end of file diff --git a/blog/higress-gvr7dx_awbbpb_bo9gbceraxmft62n/index.html b/blog/higress-gvr7dx_awbbpb_bo9gbceraxmft62n/index.html index 9adbc2026f..30a2b21618 100644 --- a/blog/higress-gvr7dx_awbbpb_bo9gbceraxmft62n/index.html +++ b/blog/higress-gvr7dx_awbbpb_bo9gbceraxmft62n/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
铭师堂的云原生升级实践点此了解
插件
插件
插件
插件
插件 \ No newline at end of file diff --git a/blog/higress-gvr7dx_awbbpb_ghwthc4xkdshgqgp/index.html b/blog/higress-gvr7dx_awbbpb_ghwthc4xkdshgqgp/index.html index f80ca12b01..c637689375 100644 --- a/blog/higress-gvr7dx_awbbpb_ghwthc4xkdshgqgp/index.html +++ b/blog/higress-gvr7dx_awbbpb_ghwthc4xkdshgqgp/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
铭师堂的云原生升级实践点此了解
\ No newline at end of file +

\ No newline at end of file diff --git a/blog/higress-gvr7dx_awbbpb_gk5nkrhm7uvuulgg/index.html b/blog/higress-gvr7dx_awbbpb_gk5nkrhm7uvuulgg/index.html index 730bab0247..a485cbc87c 100644 --- a/blog/higress-gvr7dx_awbbpb_gk5nkrhm7uvuulgg/index.html +++ b/blog/higress-gvr7dx_awbbpb_gk5nkrhm7uvuulgg/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
铭师堂的云原生升级实践点此了解
插件
插件
\ No newline at end of file diff --git a/blog/higress-gvr7dx_awbbpb_gxmuxgfaer0gyu4f/index.html b/blog/higress-gvr7dx_awbbpb_gxmuxgfaer0gyu4f/index.html index 645be32914..e092290e30 100644 --- a/blog/higress-gvr7dx_awbbpb_gxmuxgfaer0gyu4f/index.html +++ b/blog/higress-gvr7dx_awbbpb_gxmuxgfaer0gyu4f/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
铭师堂的云原生升级实践点此了解
插件
插件

热联集团:从 APISIX 迁移到云原生网关

发布时间 2024-11-12


作者:金峰(项良)、朱永林、赵世振(寰奕)
-

+

一、公司简介

杭州热联集团股份有限公司成立于 1997 年 10 月,是隶属杭州市实业投资集团的国有控股公司。公司专业从事国际、国内钢铁贸易黑色大宗商品及产业服务,业务品种涵盖钢铁原料、钢铁产品及以铜为主的有色金属等。

2023 年,热联集团实现销售总量 9634 万吨,销售收入 2555 亿元,业绩增长 50%。

2016-2023 年,公司连续八年蝉联中国钢贸企业百强榜综合榜前三。入选国务院国资委“双百行动”企业名单,以及浙江省政府“凤凰计划”名单,被列入浙江省首批内外贸一体化“领跑者”培育企业。

目前热联集团的网点建设遍布国内 31 个城市及境外 17 个国家和地区,业务范围覆盖全球 52 个国家和地区。在全球钢铁、橡胶等大宗商品贸易行业,“热联”品牌享有优异的商业信誉和企业形象。

-

+

二、业务高速发展下面临的挑战

早期,热联自主研发了一系列垂直业务功能系统,包括大宗贸易相关的资金管理和交易系统(如保融资金管理系统、投资系统、量化交易系统等)、企业内部管理相关系统(如 HR 系统、报销系统、企业招投票系统等)、企业经营管理相关系统(如自研 ERP、租赁 SAAS 系统),以及物流交付相关系统(如配送系统、TM、WMS)。这些系统部署在 IDC 的自建 K8S 中,采用微服务架构,通过 Spring Cloud + Nacos 实现微服务应用间的远程调用和服务发现,并使用 APISIX 作为南北向网关,实现统一的认证、鉴权和入口流量管控。

-

+

然而,随着业务的迅速发展和品牌的日益壮大,原有的技术架构逐渐显露出多方面的瓶颈和挑战:

  1. 软件迭代效率低下:由于所有业务都部署在 IDC 中,每次新业务上线或系统扩容时都需要经过复杂的招采流程,导致交付周期漫长,业务人员对效率问题怨声载道,运维人员也倍感压力。
  2. @@ -49,36 +49,36 @@

    灵活性至上,符合业界的主流规范、兼容开源,且提供较强的开放能力,企业可以根据自身的具体情况和标准自主定制,不受平台限制。

最终,热联在阿里云的专家团队的帮助下,找到了一条相对可行的解决路径,阿里云提出的全栈上云+云原生解决方案不仅可以满足热联提出的所有研发、运维和稳定的要求,还为企业未来的技术发展提供了强大的支持和灵活的扩展性。

-

+

热联的核心业务系统从 IDC 全栈迁移到阿里云后,稳定性提升了 100%、研发效率提升了 30%、综合成本下降了 50%

-

+

三、微服务架构的性能与稳定性提升

为了提升研发效率和稳定性、热联的核心业务系统都是微服务架构,开发语言以 Java 为主,并且全面拥抱了 Spring Cloud 的生态。一直以来热联对微服务技术都有比较高的追求。因此在云平台的选型上,微服务技术的相关产品需要满足高开放性、高成熟度、高普及度、高可用,四条标准缺一不可。

阿里云上的 MSE(微服务引擎)源自阿里巴巴微服务架构的最佳实践,是一个面向业界主流开源微服务生态的一站式微服务平台,提供注册配置中心、云原生网关、微服务治理和分布式任务调度能力。在高可用性方面自 08 年诞生以来历经了多年双十一考验。云上的商业化产品均是多可用区容灾架构,承诺可用性 SLA 99.95%。在高成熟度和高普及度方面,MSE 的注册中心 Nacos 和云原生网关 Higress 在开源社区都有比较强的影响力,并且产品的创始人团队稳定,出现问题后能第一时间找到专业的技术人员兜底。

-

+

因此,MSE 的 Nacos 和云原生网关就成了微服务技术平替的最佳选择。

APISIX 迁移到云原生网关

首先是网关的迁移,阿里的专家们在充分了解的热联 APISIX 的用法后,针对与我们目前 APISIX 上的所有功能用法,云原生网关都给出了功能对标文档和使用实践。

-

+

在迁移测试过程中,阿里的专家们,针对与我们提出的任何问题都能第一时间响应并快速解决问题,最典型的是在自定义认证鉴方面,原有热联使用的是 APISIX 的 forward-auth,forward-auth 插件实现鉴权比较灵活,用户可以任意定义鉴权服务并暴露鉴权服务的 url,然后鉴权完成后,可以通过 request header 把 clientip、目标路由的 url、token 都传递下去,而现有云原生网关默认的自定义鉴权无办法很好的满足需求,如果想用起来需要我们做一些代码改动。在了解到了我们的问题以后,阿里的专家们只用了 2 天时间就为我们提供了成熟且稳定的 ext-auth 插件,用于实现个性化的自定义鉴权。

在完成所有功能验证后,热联准备把全部流量迁移到云原生网关时,阿里的专家们为我们提供了平滑切流方案。

-

+

通过 DNS weight 的方式热联把所有网关流量都切到了云原生网关以后,再也没有出现过莫名其妙崩溃的问题,网关的可用性达到了 100%。为什么能够取得这么好的结果呢?主要得益于以下几点:

1. 云原生网关孵化自阿里内部,经过历年大促的验证,积累了一套高可用保障方案,从研发时、运行时、变更时来控制风险提升稳定性,在每个阶段各自有手段去保证其高可用目标。

-

+

2. 可扩展性对于软件的重要性毋庸置疑,相比 APISIX 使用的 Lua 扩展机制,云原生网关既可以支持 Lua 扩展,同时也支持 Wasm(WebAssembly)扩展,Wasm 插件天然支持 C++、Rust、Golang、JS 等多语言编写,原生提供插件热插拔与插件配置热更新能力,毫秒级生效,配置变更对长连接无损,且 Wasm 插件运行在安全沙箱中,插件自身的漏洞或者异常崩溃不会影响网关宿主进程,对于异常崩溃的插件也提供了自恢复机制,无需人工干预。

-

+

在性能上,目前随着网络安全愈加受重视,现在互联网上已经普遍使用 HTTPS 进行传输加密,在网关侧,用于实现 HTTPS 的 TLS 非对称加密算法是占用 CPU 资源的大头。针对此场景,云原生网关使用了 CPU SIMD 技术实现了 TLS 加解密算法的硬件加速,通过压测数据表明云原生网关采用软硬一体的加速方案相比普通 HTTPS 请求 TLS 握手时延降低一倍,极限 QPS 提升 80% 以上。

-

+

在运维效率上,整体提升了 50%,这主要得益于云原生网关本身是全托管、免运维的。无论实例的开通还是版本的升级亦或是规格的扩缩容都很方便,同时又提供了定时+按指标的弹性能力。令人惊喜的是云原生网关同阿里云上的数字证书管理、注册中心、微服务治理、ARMS、SLS 等产品都做了深度极成。

尤其是可观测方面,云原生网关提供了丰富的可观测数据,包括流量全局看板、日志检索、业务 TOP 榜、延迟/失败率/错误码等多种响应指标等,并辅以报警管理,使运维人员对服务的整体状态及异常情况尽在掌握。

-

+

开源 Nacos 迁移 MSE

热联通过 MSE SYNC 工具,把开源的 NACOS 服务都平滑的迁移到了商业版上面。

-

+

相较开源版的 Nacos,商业版产品在稳定性、性能和运维成本等方面都具备了明显的优势,这也极大的解放了研发和运维人员的生产力,让我们能更加专注业到务开发和运维上。

-

+

四、未来展望

热联集团在进行了云原生架构的升级与探索后,显著提升了业务系统的稳定性和敏捷性。这一转变不仅为公司冲击更高的销售目标奠定了坚实的技术基础,也标志着热联在数字化转型道路上迈出了关键一步。通过采用微服务、容器化等先进技术手段,热联能够更加灵活地响应市场变化,快速迭代产品和服务,满足客户日益增长的需求。

diff --git a/blog/higress-gvr7dx_awbbpb_im44tpldqyt8c97d/index.html b/blog/higress-gvr7dx_awbbpb_im44tpldqyt8c97d/index.html index bbdce795ed..f87f505231 100644 --- a/blog/higress-gvr7dx_awbbpb_im44tpldqyt8c97d/index.html +++ b/blog/higress-gvr7dx_awbbpb_im44tpldqyt8c97d/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
铭师堂的云原生升级实践点此了解
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件
插件

应用网关的演进历程和分类

发布时间 2024-11-06


唯一不变的是变化,在现代复杂的商业环境中,企业的业务形态与规模往往处于不断变化和扩大之中。这种动态发展对企业的信息系统提出了更高的要求,特别是在软件架构方面。为了应对不断变化的市场需求和业务扩展,软件架构必须进行相应的演进和优化。网关作为互联网流量的入口,其形态也在跟随软件架构持续演进迭代中。我们下面就聊一聊网关的演进历程以及在时下火热的AI浪潮下,网关又会迸发怎样新的形态。

网关演进形态概览

软件架构的演进是一个不断适应技术发展和业务需求变化的过程,伴随着软件架构的演进网关的形态也在随之持续迭代,在不同软件架构阶段中网关也呈现其不同的形态。

-

+

软件架构的演进是技术发展和业务需求不断推动的结果,从早期的简单设计到如今复杂的多层次架构,体现了软件系统在可扩展性、维护性和性能方面的不断追求。

  1. 单体架构:在软件工程的初期,单体架构是最常见的形式。所有的功能模块都集成在一个整体应用中。这种架构的优点是初期开发和部署比较简单,但随着系统功能的扩展和复杂性增加,维护和升级变得越来越困难,单点故障的风险也越来越高。
  2. @@ -39,28 +39,28 @@

    网关演进

    总体来看,软件架构演进的每一步都在寻求解决当前架构的瓶颈和不足,通过技术创新和最佳实践,使得软件系统能够更好地应对不断变化的业务需求和技术环境。

    网关演进之流量网关

    流量网关作为网络架构中的关键组件,主要负责管理和优化数据流量,以提升业务的可伸缩性和高可用性。 Nginx 作为流量网关的代表性软件,以其高效的性能和灵活的配置广受欢迎。流量网关的核心目的是解决多业务节点的流量负载均衡问题,通过智能调度将客户请求分配到不同的服务器上,从而均匀分摊负载,避免单点故障,确保服务的稳定性和连续性。

    -

    +

    网关演进之ESB

    企业服务总线(ESB)网关是一个专为企业设计的关键集成解决方案,旨在标准化和简化不同系统和服务之间的通信与消息传送。作为核心通信基础设施,ESB网关可以减少系统间的耦合性,提高互操作性和灵活性,确保数据和服务的无缝整合。遵循服务导向型架构(SOA)原则,ESB 通过集中管理消息路由、转换和安全,实现服务的快速部署和高效运作。它支持不同协议和数据格式,提升了系统的扩展性和可维护性,帮助企业在不断变化的业务环境中保持竞争力与创新。

    -

    +

    网关演进之微服务网关

    微服务网关是微服务架构中的关键组件,负责集中管理微服务的路由规则,增强系统安全性,提供性能监控,并简化访问流程,从而提高整个系统的可靠性。微服务网关可以实现负载均衡、限流、熔断、身份验证等功能,通过统一入口管理和优化各微服务间的交互。此举不仅简化了客户端与微服务的通信复杂性,还为系统安全提供了额外的保护,Spring Cloud Gateway 是一个广泛应用的微服务网关,它基于 Spring 生态系统,易于与 Spring Boot 项目集成,因其灵活、高效和可扩展性受到了开发者的青睐。

    -

    +

    网关演进之云原生网关

    云原生网关是伴随 K8s 的广泛应用而诞生的一种创新网关,K8s 集群内外网络天然隔离的特性要求通过网关来将外部请求转发给集群内部服务,K8s 采用 Ingress/Gateway API 来统一网关的配置方式,同时 K8s 提供了弹性扩缩容来帮助用户解决应用容量调度问题,基于此用户对网关产生了新的诉求:期望网关既能有流量网关的特性来处理海量请求,又具备微服务网关的特性来做服务发现与服务治理,同时要求网关也具备弹性扩缩容能力解决容量调度问题,能够让开发者能够专注于业务逻辑的实现,而无需担心底层架构的容量、维护和管理。

    -

    +

    网关演进的下一站:AI网关

    AI 网关是专为处理 AI 流量设计的关键组件,具备长连接、大带宽、高延时的特性,能够高效管理和优化数据传输。在 AI 应用、AI 平台和大型语言模型(LLM)中,不同的场景对 AI 网关的性能和功能有着多样化的需求。为更好地满足这些需求,AI 网关提供了丰富的AI插件集,开发者可以通过低代码方式轻松集成和构建复杂的 AI 应用。这不仅大幅降低了开发难度,还显著提高了效率,使得 AI 技术在各类应用和平台中更加易用和普及。AI 网关因此成为推动AI创新和应用落地的核心推动力。

    -

    +

    API网关去哪了?

    读到这里的同学可能会有这么一个问题:API 网关去哪了?我们耳熟能详的API网关为什么没有提到呢?回答这个问题之前我们可以先问自己一个问题:API 是什么?API 包含什么?

    在流量网关中我们配置的路由本身也是一种API,只是没有定义规范的请求/响应标准而已,通常我们称为 HTTP API,在 AWS API Gateway 中的 HTTP API 指的就是这个,目前 HTTP API 使用最简单、应用最广;REST API 相信大家基本都或多或少听说过,它采用 JSON 格式来规范请求/响应,在微服务网关中应用较广;Websocket/gRPC/Dubbo API这 些相信大家同样不会陌生,因此可以说支持 API 访问的都是 API 网关,API 网关是贯穿软件架构演进的各个阶段。时间来到了当下,在 AI 浪潮下 API 网关又会迸发出怎样新的特性呢?

    -

    +

    Higress:AI 原生的 API 网关

    Higress 源自阿里巴巴内部电商、交易等核心生产场景的实践沉淀,遵循 Ingress/Gateway API 标准,将流量网关、微服务网关、安全网关三合一,并在此基础上扩展了服务管理插件、安全类插件和自定义插件,高度集成 K8s 和微服务生态,包括 Nacos 注册和配置、Sentinel 限流降级等能力,并支持规则变更毫秒级生效等热更新能力。

    在 AI 浪潮下,Higress 面向 AI Native 场景提供原生扩展能力以满足复杂的 AI 应用需求。它不仅支持常见的API管理、流量控制和安全策略,还具备与 AI 模型无缝集成的特性。Higress通过灵活的插件机制,允许开发者轻松添加自定义功能,提升扩展性和适应不同应用场景的能力。借助高性能的处理能力和智能流量调度,Higress 网关可以显著减少延迟,提升 AI 服务的响应速度。此外,Higress 强大的监控和日志功能,帮助开发者快速定位和解决问题,使 AI 应用的开发和运维变得更加高效和可靠。

    -

    +

    本文整理自《统一多层网关架构视频课程》的第一期视频,下载课程PPT和查看回放请点击下载课程 PPT 查看回放

    更多课程

    -

\ No newline at end of file +

\ No newline at end of file diff --git a/blog/higress-gvr7dx_awbbpb_tdx29ymg8tenqszi/index.html b/blog/higress-gvr7dx_awbbpb_tdx29ymg8tenqszi/index.html index afd07f305c..57404307c2 100644 --- a/blog/higress-gvr7dx_awbbpb_tdx29ymg8tenqszi/index.html +++ b/blog/higress-gvr7dx_awbbpb_tdx29ymg8tenqszi/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
铭师堂的云原生升级实践点此了解
插件
插件
插件

Higress@深圳,AI 应用企业开发者沙龙邀您参会

发布时间 2024-11-26


+ astro-bxjx6km4" data-on="EN" data-off="中文">
中文

Higress@深圳,AI 应用企业开发者沙龙邀您参会

发布时间 2024-11-26


邀您一起交流,探索 AI 原生应用的工程化落地!

一、活动简介

Al 驱动的应用程序开发、部署和运维,给应用带来了新的生命力和想象空间。但大部分企业、尤其是中小型企业对 Al 应用的编程框架、可观测体系、网关架构的设计和使用依旧不太熟练,生产环境下的工程化实践仍不太丰富。为此我们邀请了深耕 Al 应用工程化的一线研发工程师,分享他们的生产经验,以及 Spring Al Alibaba 和 Higress 等开源项目的最新进展,并通过现场实操加固学习效果。本次活动因场地限制,采取报名审核制度,现场完成实操(需携带电脑),颁发专属证书。

@@ -33,6 +33,6 @@
  • 活动地址:https://hd.aliyun.com/form/5292
  • 二、详细议程

    -

    +

    三、往期回顾

    -

    \ No newline at end of file +

    \ No newline at end of file diff --git a/blog/higress-gvr7dx_awbbpb_uddq0l7v5a5vadc6/index.html b/blog/higress-gvr7dx_awbbpb_uddq0l7v5a5vadc6/index.html index 4a47cc3434..76b84b3886 100644 --- a/blog/higress-gvr7dx_awbbpb_uddq0l7v5a5vadc6/index.html +++ b/blog/higress-gvr7dx_awbbpb_uddq0l7v5a5vadc6/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践点此了解
    插件
    插件
    插件
    插件
    插件
    插件
    \ No newline at end of file diff --git a/blog/higress-gvr7dx_awbbpb_xdxim253zzta4bun/index.html b/blog/higress-gvr7dx_awbbpb_xdxim253zzta4bun/index.html index bc6f6736f0..49a952587f 100644 --- a/blog/higress-gvr7dx_awbbpb_xdxim253zzta4bun/index.html +++ b/blog/higress-gvr7dx_awbbpb_xdxim253zzta4bun/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践点此了解
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    关于 Higress
    Higress Cloud
    一键开始您的 Higress Cloud 之旅!
    开发版
    ¥0.826 元/小时起
    适用于公共云的开发和测试环境
    apigw.dev.x1
    最大客户端连接数:24000
    最大 HTTPS 每秒新建连接数:800
    最大短连接 QPS:1700
    最大长连接 QPS:2200
    无 SLA 保障
    兼容开源,产品功能和生产版相同,但是不保障 SLA
    生产版
    ¥1.935 元/小时起
    适用于公共云的所有环境(开发、测试、生产)
    apigw.small.x1
    最大客户端连接数:48000
    最大 HTTPS 每秒新建连接数:1600
    最大短连接 QPS:3400
    最大长连接 QPS:4400
    SLA:99.99%
    兼容开源,提供高可用、默认安全、最高性能、完整的可观测能力,以及更易用的自动化运维服务
    免费试用
    Free

    适用于公共云的开发和测试环境
    兼容开源,产品功能和生产版相同,但是不保障 SLA
    开发版
    ¥249.6 元/月起

    适用于公共云的开发和测试环境
    兼容开源,提供高可用,默认安全、最高性能、完整可观测能力、更易用的自动化运维服务
    1. 首次购买资源包享受6折优惠,比后付费节省178元/月
    2. 资源包续费,比后付费节省345元/月
    生产版
    ¥585 元/月起

    适用于公共云的所有环境(开发、测试、生产)
    兼容开源,提供高可用、默认安全、最高性能、完整的可观测能力,以及更易用的自动化运维服务
    1. 首次购买资源包享受6折优惠,比后付费节省808元/月
    2. 资源包续费,比后付费节省418元/月
    不同版本功能对比

    社区版

    免费

    开发版

    后付费:0.826元/小时起

    apigw.dev.x1

    最大客户端连接数:24000

    最大 HTTPS 每秒新建连接数:800

    最大短连接 QPS:1700

    最大长连接 QPS:2200

    无 SLA 保障

    资源包:249.6元/月起

    1. 首次购买资源包享受6折优惠,比后付费节省178元/月

    2. 资源包续费,比后付费节省345元/月

    生产版

    后付费:1.935元/小时起

    apigw.small.x1

    最大客户端连接数:48000

    最大 HTTPS 每秒新建连接数:1600

    最大短连接 QPS:3400

    最大长连接 QPS:4400

    SLA:99.99%

    资源包:585元/月起

    1. 首次购买资源包享受6折优惠,比后付费节省808元/月

    2. 资源包续费,比后付费节省418元/月

    易用性

    自动化运维

    免运维

    多种服务发现能力

    自行实现

    支持 K8s、Nacos、Zookeeper、DNS、固定IP及其他云产品

    支持 K8s、Nacos、Zookeeper、DNS、固定IP及其他云产品

    协议自动转化(HTTPS转Dubbo)

    RAM鉴权和权限管理

    云产品集成

    和阿里云 MSE 注册配置、微服务治理等产品深度集成

    和阿里云 MSE 注册配置、微服务治理等产品深度集成

    可用性

    SLA

    99.95%

    99.9%

    多节点容灾

    多可区容灾

    推空保护

    过载保护

    限流降级

    全局限流,需要自建 Redis

    故障自动检测和恢复

    自动扩缩容

    内置扩容上限,避免恶意攻击导致资损

    安全性

    IP黑白名单

    消费者鉴权

    全局认证及鉴权

    Waf防护

    开源方案,静态规则

    商业方案,动态运营规则

    商业方案,动态运营规则

    性能

    HTTPS 请求吞吐量提升

    自行调优

    86%

    软硬一体技术和 Envoy 内核调优

    86%

    软硬一体技术和 Envoy 内核调优

    RT 下降

    自行调优

    86%

    软硬一体技术和 Envoy 内核调优

    86%

    软硬一体技术和 Envoy 内核调优

    可观测性

    基础监控

    (基于 Prometheus + Grafana 的监控套件)

    高级监控

    (可对QPS、请求耗时、后端服务成功率等指标进行监控)

    自定义告警

    (通过钉钉、电话、短信等告警渠道)

    易用性
    可用性
    安全性
    性能
    可观测性
    关于 Higress
    Higress Cloud
    一键开始您的 Higress Cloud 之旅!
    开发版
    ¥0.826 元/小时起
    适用于公共云的开发和测试环境
    apigw.dev.x1
    最大客户端连接数:24000
    最大 HTTPS 每秒新建连接数:800
    最大短连接 QPS:1700
    最大长连接 QPS:2200
    无 SLA 保障
    兼容开源,产品功能和生产版相同,但是不保障 SLA
    生产版
    ¥1.935 元/小时起
    适用于公共云的所有环境(开发、测试、生产)
    apigw.small.x1
    最大客户端连接数:48000
    最大 HTTPS 每秒新建连接数:1600
    最大短连接 QPS:3400
    最大长连接 QPS:4400
    SLA:99.99%
    兼容开源,提供高可用、默认安全、最高性能、完整的可观测能力,以及更易用的自动化运维服务
    免费试用
    Free

    适用于公共云的开发和测试环境
    兼容开源,产品功能和生产版相同,但是不保障 SLA
    开发版
    ¥249.6 元/月起

    适用于公共云的开发和测试环境
    兼容开源,提供高可用,默认安全、最高性能、完整可观测能力、更易用的自动化运维服务
    1. 首次购买资源包享受6折优惠,比后付费节省178元/月
    2. 资源包续费,比后付费节省345元/月
    生产版
    ¥585 元/月起

    适用于公共云的所有环境(开发、测试、生产)
    兼容开源,提供高可用、默认安全、最高性能、完整的可观测能力,以及更易用的自动化运维服务
    1. 首次购买资源包享受6折优惠,比后付费节省808元/月
    2. 资源包续费,比后付费节省418元/月
    不同版本功能对比

    社区版

    免费

    开发版

    后付费:0.826元/小时起

    apigw.dev.x1

    最大客户端连接数:24000

    最大 HTTPS 每秒新建连接数:800

    最大短连接 QPS:1700

    最大长连接 QPS:2200

    无 SLA 保障

    资源包:249.6元/月起

    1. 首次购买资源包享受6折优惠,比后付费节省178元/月

    2. 资源包续费,比后付费节省345元/月

    生产版

    后付费:1.935元/小时起

    apigw.small.x1

    最大客户端连接数:48000

    最大 HTTPS 每秒新建连接数:1600

    最大短连接 QPS:3400

    最大长连接 QPS:4400

    SLA:99.99%

    资源包:585元/月起

    1. 首次购买资源包享受6折优惠,比后付费节省808元/月

    2. 资源包续费,比后付费节省418元/月

    易用性

    自动化运维

    免运维

    多种服务发现能力

    自行实现

    支持 K8s、Nacos、Zookeeper、DNS、固定IP及其他云产品

    支持 K8s、Nacos、Zookeeper、DNS、固定IP及其他云产品

    协议自动转化(HTTPS转Dubbo)

    RAM鉴权和权限管理

    云产品集成

    和阿里云 MSE 注册配置、微服务治理等产品深度集成

    和阿里云 MSE 注册配置、微服务治理等产品深度集成

    可用性

    SLA

    99.95%

    99.9%

    多节点容灾

    多可区容灾

    推空保护

    过载保护

    限流降级

    全局限流,需要自建 Redis

    故障自动检测和恢复

    自动扩缩容

    内置扩容上限,避免恶意攻击导致资损

    安全性

    IP黑白名单

    消费者鉴权

    全局认证及鉴权

    Waf防护

    开源方案,静态规则

    商业方案,动态运营规则

    商业方案,动态运营规则

    性能

    HTTPS 请求吞吐量提升

    自行调优

    86%

    软硬一体技术和 Envoy 内核调优

    86%

    软硬一体技术和 Envoy 内核调优

    RT 下降

    自行调优

    86%

    软硬一体技术和 Envoy 内核调优

    86%

    软硬一体技术和 Envoy 内核调优

    可观测性

    基础监控

    (基于 Prometheus + Grafana 的监控套件)

    高级监控

    (可对QPS、请求耗时、后端服务成功率等指标进行监控)

    自定义告警

    (通过钉钉、电话、短信等告警渠道)

    易用性
    可用性
    安全性
    性能
    可观测性

    友情链接: diff --git a/docs/developers/committer-guide/label-an-issue-guide_dev/index.html b/docs/developers/committer-guide/label-an-issue-guide_dev/index.html index 699c184e66..1581f27a54 100644 --- a/docs/developers/committer-guide/label-an-issue-guide_dev/index.html +++ b/docs/developers/committer-guide/label-an-issue-guide_dev/index.html @@ -33,7 +33,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - + 跳转到内容

    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解

    AI Token限流

    功能说明

    ai-token-ratelimit插件实现了基于特定键值实现token限流,键值来源可以是 URL 参数、HTTP 请求头、客户端 IP 地址、consumer 名称、cookie中 key 名称

    -

    注意

    -

    此插件功能生效,需要同时开启 AI 可观测插件,实现 token 数的统计

    运行属性

    插件执行阶段:默认阶段 插件执行优先级:600

    diff --git a/docs/latest/plugins/ai/api-dev/ai-agent/index.html b/docs/latest/plugins/ai/api-dev/ai-agent/index.html index b51e5345f5..c3c4ca32c6 100644 --- a/docs/latest/plugins/ai/api-dev/ai-agent/index.html +++ b/docs/latest/plugins/ai/api-dev/ai-agent/index.html @@ -33,7 +33,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - + 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解

    AI 代理

    功能说明

    +

    AI 代理

    功能说明

    AI 代理插件实现了基于 OpenAI API 契约的 AI 代理功能。目前支持 OpenAI、Azure OpenAI、月之暗面(Moonshot)和通义千问等 AI 服务提供商。

    @@ -156,7 +156,21 @@

    基本配置

    -
    名称数据类型填写要求默认值描述
    typestring必填-AI 服务提供商名称
    apiTokensarray of string非必填-用于在访问 AI 服务时进行认证的令牌。如果配置了多个 token,插件会在请求时随机进行选择。部分服务提供商只支持配置一个 token。
    timeoutnumber非必填-访问 AI 服务的超时时间。单位为毫秒。默认值为 120000,即 2 分钟
    modelMappingmap of string非必填-AI 模型映射表,用于将请求中的模型名称映射为服务提供商支持模型名称。
    1. 支持前缀匹配。例如用 “gpt-3-” 匹配所有名称以“gpt-3-”开头的模型;
    2. 支持使用 "
    " 为键来配置通用兜底映射关系;
    3. 如果映射的目标名称为空字符串 "",则表示保留原模型名称。
    protocolstring非必填-插件对外提供的 API 接口契约。目前支持以下取值:openai(默认值,使用 OpenAI 的接口契约)、original(使用目标服务提供商的原始接口契约)
    contextobject非必填-配置 AI 对话上下文信息
    customSettingsarray of customSetting非必填-为AI请求指定覆盖或者填充参数
    + + + + + + + + + + + + + + +
    名称数据类型填写要求默认值描述
    typestring必填-AI 服务提供商名称
    apiTokensarray of string非必填-用于在访问 AI 服务时进行认证的令牌。如果配置了多个 token,插件会在请求时随机进行选择。部分服务提供商只支持配置一个 token。
    timeoutnumber非必填-访问 AI 服务的超时时间。单位为毫秒。默认值为 120000,即 2 分钟
    modelMappingmap of string非必填-AI 模型映射表,用于将请求中的模型名称映射为服务提供商支持模型名称。
    1. 支持前缀匹配。例如用 “gpt-3-” 匹配所有名称以“gpt-3-”开头的模型;
    2. 支持使用 "
    " 为键来配置通用兜底映射关系;
    3. 如果映射的目标名称为空字符串 "",则表示保留原模型名称。
    protocolstring非必填-插件对外提供的 API 接口契约。目前支持以下取值:openai(默认值,使用 OpenAI 的接口契约)、original(使用目标服务提供商的原始接口契约)
    contextobject非必填-配置 AI 对话上下文信息
    customSettingsarray of customSetting非必填-为AI请求指定覆盖或者填充参数
    failoverobject非必填-配置 apiToken 的 failover 策略,当 apiToken 不可用时,将其移出 apiToken 列表,待健康检测通过后重新添加回 apiToken 列表
    retryOnFailureobject非必填-当请求失败时立即进行重试

    context的配置字段说明如下:

    @@ -310,6 +324,97 @@

    基本配置

    settingNameopenaibaidusparkqwengeminihunyuanclaudeminimax
    max_tokensmax_tokensmax_output_tokensmax_tokensmax_tokensmaxOutputTokensnonemax_tokenstokens_to_generate
    temperaturetemperaturetemperaturetemperaturetemperaturetemperatureTemperaturetemperaturetemperature
    top_ptop_ptop_pnonetop_ptopPTopPtop_ptop_p
    top_knonenonetop_knonetopKnonetop_knone
    seedseednonenoneseednonenonenonenone

    如果启用了raw模式,custom-setting会直接用输入的namevalue去更改请求中的json内容,而不对参数名称做任何限制和修改。 对于大多数协议,custom-setting都会在json内容的根路径修改或者填充参数。对于qwen协议,ai-proxy会在json的parameters子路径下做配置。对于gemini协议,则会在generation_config子路径下做配置。

    +

    failover 的配置字段说明如下:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称数据类型填写要求默认值描述
    enabledbool非必填false是否启用 apiToken 的 failover 机制
    failureThresholdint非必填3触发 failover 连续请求失败的阈值(次数)
    successThresholdint非必填1健康检测的成功阈值(次数)
    healthCheckIntervalint非必填5000健康检测的间隔时间,单位毫秒
    healthCheckTimeoutint非必填5000健康检测的超时时间,单位毫秒
    healthCheckModelstring启用 failover 时必填健康检测使用的模型
    +

    retryOnFailure 的配置字段说明如下:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称数据类型填写要求默认值描述
    enabledbool非必填false是否启用失败请求重试
    maxRetriesint非必填1最大重试次数
    retryTimeoutint非必填30000重试超时时间,单位毫秒

    提供商特有配置

    OpenAI

    OpenAI 所对应的 typeopenai。它特有的配置字段如下:

    @@ -425,9 +530,52 @@

    DeepSeek(DeepSeek)

    Groq

    Groq 所对应的 typegroq。它并无特有的配置字段。

    文心一言(Baidu)

    -

    文心一言所对应的 typebaidu。它并无特有的配置字段。

    +

    文心一言所对应的 typebaidu。它特有的配置字段如下:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    名称数据类型填写要求默认值描述
    baiduAccessKeyAndSecretarray of string必填-Baidu 的 Access Key 和 Secret Key,中间用 : 分隔,用于申请 apiToken。
    baiduApiTokenServiceNamestring必填-请求刷新百度 apiToken 服务名称。
    baiduApiTokenServiceHoststring非必填-请求刷新百度 apiToken 服务域名,默认是 iam.bj.baidubce.com。
    baiduApiTokenServicePortint64非必填-请求刷新百度 apiToken 服务端口,默认是 443。

    360智脑

    360智脑所对应的 typeai360。它并无特有的配置字段。

    +

    GitHub模型

    +

    GitHub模型所对应的 typegithub。它并无特有的配置字段。

    Mistral

    Mistral 所对应的 typemistral。它并无特有的配置字段。

    MiniMax

    @@ -451,7 +599,14 @@

    MiniMax

    -
    名称数据类型填写要求默认值描述
    minimaxGroupIdstring当使用abab6.5-chat, abab6.5s-chat, abab5.5s-chat, abab5.5-chat四种模型时必填-当使用abab6.5-chat, abab6.5s-chat, abab5.5s-chat, abab5.5-chat四种模型时会使用ChatCompletion Pro,需要设置groupID
    + + + + + + + +
    名称数据类型填写要求默认值描述
    minimaxApiTypestringv2 和 pro 中选填一项v2v2 代表 ChatCompletion v2 API,pro 代表 ChatCompletion Pro API
    minimaxGroupIdstringminimaxApiType 为 pro 时必填-minimaxApiType 为 pro 时使用 ChatCompletion Pro API,需要设置 groupID

    Anthropic Claude

    Anthropic Claude 所对应的 typeclaude。它特有的配置字段如下:

    @@ -605,52 +760,157 @@

    DeepL

    名称数据类型填写要求默认值描述
    targetLangstring必填-DeepL 翻译服务需要的目标语种

    Cohere

    Cohere 所对应的 typecohere。它并无特有的配置字段。

    +

    Together-AI

    +

    Together-AI 所对应的 typetogether-ai。它并无特有的配置字段。

    用法示例

    使用 OpenAI 协议代理 Azure OpenAI 服务

    使用最基本的 Azure OpenAI 服务,不配置任何上下文。

    配置信息

    provider:
    type: azure
    apiTokens:
    - "YOUR_AZURE_OPENAI_API_TOKEN"
    azureServiceUrl: "https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2024-02-15-preview",
    +

    请求示例

    +
    {
    "model": "gpt-3",
    "messages": [
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ],
    "temperature": 0.3
    }
    +

    响应示例

    +
    {
    "choices": [
    {
    "content_filter_results": {
    "hate": {
    "filtered": false,
    "severity": "safe"
    },
    "self_harm": {
    "filtered": false,
    "severity": "safe"
    },
    "sexual": {
    "filtered": false,
    "severity": "safe"
    },
    "violence": {
    "filtered": false,
    "severity": "safe"
    }
    },
    "finish_reason": "stop",
    "index": 0,
    "logprobs": null,
    "message": {
    "content": "你好!我是一个AI助手,可以回答你的问题和提供帮助。有什么我可以帮到你的吗?",
    "role": "assistant"
    }
    }
    ],
    "created": 1714807624,
    "id": "chatcmpl-abcdefg1234567890",
    "model": "gpt-35-turbo-16k",
    "object": "chat.completion",
    "prompt_filter_results": [
    {
    "prompt_index": 0,
    "content_filter_results": {
    "hate": {
    "filtered": false,
    "severity": "safe"
    },
    "self_harm": {
    "filtered": false,
    "severity": "safe"
    },
    "sexual": {
    "filtered": false,
    "severity": "safe"
    },
    "violence": {
    "filtered": false,
    "severity": "safe"
    }
    }
    }
    ],
    "system_fingerprint": null,
    "usage": {
    "completion_tokens": 40,
    "prompt_tokens": 15,
    "total_tokens": 55
    }
    }

    使用 OpenAI 协议代理通义千问服务

    使用通义千问服务,并配置从 OpenAI 大模型到通义千问的模型映射关系。

    配置信息

    provider:
    type: qwen
    apiTokens:
    - "YOUR_QWEN_API_TOKEN"
    modelMapping:
    'gpt-3': "qwen-turbo"
    'gpt-35-turbo': "qwen-plus"
    'gpt-4-turbo': "qwen-max"
    'gpt-4-*': "qwen-max"
    'gpt-4o': "qwen-vl-plus"
    'text-embedding-v1': 'text-embedding-v1'
    '*': "qwen-turbo"
    +

    AI 对话请求示例

    +

    URL: http://your-domain/v1/chat/completions

    +

    请求示例:

    +
    {
    "model": "gpt-3",
    "messages": [
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ],
    "temperature": 0.3
    }
    +

    响应示例:

    +
    {
    "id": "c2518bd3-0f46-97d1-be34-bb5777cb3108",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "我是通义千问,由阿里云开发的AI助手。我可以回答各种问题、提供信息和与用户进行对话。有什么我可以帮助你的吗?"
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1715175072,
    "model": "qwen-turbo",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 24,
    "completion_tokens": 33,
    "total_tokens": 57
    }
    }
    +

    多模态模型 API 请求示例(适用于 qwen-vl-plusqwen-vl-max 模型)

    +

    URL: http://your-domain/v1/chat/completions

    +

    请求示例:

    +
    {
    "model": "gpt-4o",
    "messages": [
    {
    "role": "user",
    "content": [
    {
    "type": "image_url",
    "image_url": {
    "url": "https://dashscope.oss-cn-beijing.aliyuncs.com/images/dog_and_girl.jpeg"
    }
    },
    {
    "type": "text",
    "text": "这个图片是哪里?"
    }
    ]
    }
    ],
    "temperature": 0.3
    }
    +

    响应示例:

    +
    {
    "id": "17c5955d-af9c-9f28-bbde-293a9c9a3515",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": [
    {
    "text": "这张照片显示的是一位女士和一只狗在海滩上。由于我无法获取具体的地理位置信息,所以不能确定这是哪个地方的海滩。但是从视觉内容来看,它可能是一个位于沿海地区的沙滩海岸线,并且有海浪拍打着岸边。这样的场景在全球许多美丽的海滨地区都可以找到。如果您需要更精确的信息,请提供更多的背景或细节描述。"
    }
    ]
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1723949230,
    "model": "qwen-vl-plus",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 1279,
    "completion_tokens": 78
    }
    }
    +

    文本向量请求示例

    +

    URL: http://your-domain/v1/embeddings

    +

    请求示例:

    +
    {
    "model": "text-embedding-v1",
    "input": "Hello"
    }
    +

    响应示例:

    +
    {
    "object": "list",
    "data": [
    {
    "object": "embedding",
    "index": 0,
    "embedding": [
    -1.0437825918197632,
    5.208984375,
    3.0483806133270264,
    -1.7897135019302368,
    -2.0107421875,
    ...,
    0.8125,
    -1.1759847402572632,
    0.8174641728401184,
    1.0432943105697632,
    -0.5885213017463684
    ]
    }
    ],
    "model": "text-embedding-v1",
    "usage": {
    "prompt_tokens": 1,
    "total_tokens": 1
    }
    }
    +

    使用通义千问配合纯文本上下文信息

    +

    使用通义千问服务,同时配置纯文本上下文信息。

    +

    配置信息

    +
    provider:
    type: qwen
    apiTokens:
    - "YOUR_QWEN_API_TOKEN"
    modelMapping:
    "*": "qwen-turbo"
    context:
    - fileUrl: "http://file.default.svc.cluster.local/ai/context.txt",
    serviceName: "file.dns",
    servicePort: 80
    +

    请求示例

    +
    {
    "model": "gpt-3",
    "messages": [
    {
    "role": "user",
    "content": "请概述文案内容"
    }
    ],
    "temperature": 0.3
    }
    +

    响应示例

    +
    {
    "id": "cmpl-77861a17681f4987ab8270dbf8001936",
    "object": "chat.completion",
    "created": 9756990,
    "model": "moonshot-v1-128k",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "这份文案是一份关于..."
    },
    "finish_reason": "stop"
    }
    ],
    "usage": {
    "prompt_tokens": 20181,
    "completion_tokens": 439,
    "total_tokens": 20620
    }
    }
    +

    使用通义千问配合其原生的文件上下文

    +

    提前上传文件至通义千问,以文件内容作为上下文使用其 AI 服务。

    +

    配置信息

    +
    provider:
    type: qwen
    apiTokens:
    - "YOUR_QWEN_API_TOKEN"
    modelMapping:
    "*": "qwen-long" # 通义千问的文件上下文只能在 qwen-long 模型下使用
    qwenFileIds:
    - "file-fe-xxx"
    - "file-fe-yyy"
    +

    请求示例

    +
    {
    "model": "gpt-4-turbo",
    "messages": [
    {
    "role": "user",
    "content": "请概述文案内容"
    }
    ],
    "temperature": 0.3
    }
    +

    响应示例

    +
    {
    "output": {
    "choices": [
    {
    "finish_reason": "stop",
    "message": {
    "role": "assistant",
    "content": "您上传了两个文件,`context.txt` 和 `context_2.txt`,它们似乎都包含了关于xxxx"
    }
    }
    ]
    },
    "usage": {
    "total_tokens": 2023,
    "output_tokens": 530,
    "input_tokens": 1493
    },
    "request_id": "187e99ba-5b64-9ffe-8f69-01dafbaf6ed7"
    }

    使用original协议代理百炼智能体应用

    配置信息

    provider:
    type: qwen
    apiTokens:
    - "YOUR_DASHSCOPE_API_TOKEN"
    protocol: original
    +

    请求实例

    +
    {
    "input": {
    "prompt": "介绍一下Dubbo"
    },
    "parameters": {},
    "debug": {}
    }
    +

    响应实例

    +
    {
    "output": {
    "finish_reason": "stop",
    "session_id": "677e7e8fbb874e1b84792b65042e1599",
    "text": "Apache Dubbo 是一个..."
    },
    "usage": {
    "models": [
    {
    "output_tokens": 449,
    "model_id": "qwen-max",
    "input_tokens": 282
    }
    ]
    },
    "request_id": "b59e45e3-5af4-91df-b7c6-9d746fd3297c"
    }

    使用 OpenAI 协议代理豆包大模型服务

    配置信息

    provider:
    type: doubao
    apiTokens:
    - YOUR_DOUBAO_API_KEY
    modelMapping:
    '*': YOUR_DOUBAO_ENDPOINT
    timeout: 1200000
    +

    使用 original 协议代理 Coze 应用

    +

    配置信息

    +
    provider:
    type: coze
    apiTokens:
    - YOUR_COZE_API_KEY
    protocol: original

    使用月之暗面配合其原生的文件上下文

    提前上传文件至月之暗面,以文件内容作为上下文使用其 AI 服务。

    配置信息

    provider:
    type: moonshot
    apiTokens:
    - "YOUR_MOONSHOT_API_TOKEN"
    moonshotFileId: "YOUR_MOONSHOT_FILE_ID",
    modelMapping:
    '*': "moonshot-v1-32k"
    +

    请求示例

    +
    {
    "model": "gpt-4-turbo",
    "messages": [
    {
    "role": "user",
    "content": "请概述文案内容"
    }
    ],
    "temperature": 0.3
    }
    +

    响应示例

    +
    {
    "id": "cmpl-e5ca873642ca4f5d8b178c1742f9a8e8",
    "object": "chat.completion",
    "created": 1872961,
    "model": "moonshot-v1-128k",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "文案内容是关于一个名为“xxxx”的支付平台..."
    },
    "finish_reason": "stop"
    }
    ],
    "usage": {
    "prompt_tokens": 11,
    "completion_tokens": 498,
    "total_tokens": 509
    }
    }

    使用 OpenAI 协议代理 Groq 服务

    配置信息

    provider:
    type: groq
    apiTokens:
    - "YOUR_GROQ_API_TOKEN"
    +

    请求示例

    +
    {
    "model": "llama3-8b-8192",
    "messages": [
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ]
    }
    +

    响应示例

    +
    {
    "id": "chatcmpl-26733989-6c52-4056-b7a9-5da791bd7102",
    "object": "chat.completion",
    "created": 1715917967,
    "model": "llama3-8b-8192",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "😊 Ni Hao! (That's \"hello\" in Chinese!)\n\nI am LLaMA, an AI assistant developed by Meta AI that can understand and respond to human input in a conversational manner. I'm not a human, but a computer program designed to simulate conversations and answer questions to the best of my ability. I'm happy to chat with you in Chinese or help with any questions or topics you'd like to discuss! 😊"
    },
    "logprobs": null,
    "finish_reason": "stop"
    }
    ],
    "usage": {
    "prompt_tokens": 16,
    "prompt_time": 0.005,
    "completion_tokens": 89,
    "completion_time": 0.104,
    "total_tokens": 105,
    "total_time": 0.109
    },
    "system_fingerprint": "fp_dadc9d6142",
    "x_groq": {
    "id": "req_01hy2awmcxfpwbq56qh6svm7qz"
    }
    }

    使用 OpenAI 协议代理 Claude 服务

    配置信息

    provider:
    type: claude
    apiTokens:
    - "YOUR_CLAUDE_API_TOKEN"
    version: "2023-06-01"
    +

    请求示例

    +
    {
    "model": "claude-3-opus-20240229",
    "max_tokens": 1024,
    "messages": [
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ]
    }
    +

    响应示例

    +
    {
    "id": "msg_01Jt3GzyjuzymnxmZERJguLK",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "您好,我是一个由人工智能公司Anthropic开发的聊天助手。我的名字叫Claude,是一个聪明友善、知识渊博的对话系统。很高兴认识您!我可以就各种话题与您聊天,回答问题,提供建议和帮助。我会尽最大努力给您有帮助的回复。希望我们能有个愉快的交流!"
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1717385918,
    "model": "claude-3-opus-20240229",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 16,
    "completion_tokens": 126,
    "total_tokens": 142
    }
    }

    使用 OpenAI 协议代理混元服务

    配置信息

    provider:
    type: "hunyuan"
    hunyuanAuthKey: "<YOUR AUTH KEY>"
    apiTokens:
    - ""
    hunyuanAuthId: "<YOUR AUTH ID>"
    timeout: 1200000
    modelMapping:
    "*": "hunyuan-lite"
    +

    请求示例

    +

    请求脚本:

    +
    Terminal window
    curl --location 'http://<your higress domain>/v1/chat/completions' \
    --header 'Content-Type: application/json' \
    --data '{
    "model": "gpt-3",
    "messages": [
    {
    "role": "system",
    "content": "你是一个名专业的开发人员!"
    },
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ],
    "temperature": 0.3,
    "stream": false
    }'
    +

    响应示例

    +
    {
    "id": "fd140c3e-0b69-4b19-849b-d354d32a6162",
    "choices": [
    {
    "index": 0,
    "delta": {
    "role": "assistant",
    "content": "你好!我是一名专业的开发人员。"
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1717493117,
    "model": "hunyuan-lite",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 15,
    "completion_tokens": 9,
    "total_tokens": 24
    }
    }

    使用 OpenAI 协议代理百度文心一言服务

    配置信息

    provider:
    type: baidu
    apiTokens:
    - "YOUR_BAIDU_API_TOKEN"
    modelMapping:
    'gpt-3': "ERNIE-4.0"
    '*': "ERNIE-4.0"
    +

    请求示例

    +
    {
    "model": "gpt-4-turbo",
    "messages": [
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ],
    "stream": false
    }
    +

    响应示例

    +
    {
    "id": "as-e90yfg1pk1",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "你好,我是文心一言,英文名是ERNIE Bot。我能够与人对话互动,回答问题,协助创作,高效便捷地帮助人们获取信息、知识和灵感。"
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1717251488,
    "model": "ERNIE-4.0",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 4,
    "completion_tokens": 33,
    "total_tokens": 37
    }
    }

    使用 OpenAI 协议代理MiniMax服务

    配置信息

    -
    provider:
    type: minimax
    apiTokens:
    - "YOUR_MINIMAX_API_TOKEN"
    modelMapping:
    "gpt-3": "abab6.5g-chat"
    "gpt-4": "abab6.5-chat"
    "*": "abab6.5g-chat"
    minimaxGroupId: "YOUR_MINIMAX_GROUP_ID"
    +
    provider:
    type: minimax
    apiTokens:
    - "YOUR_MINIMAX_API_TOKEN"
    modelMapping:
    "gpt-3": "abab6.5s-chat"
    "gpt-4": "abab6.5g-chat"
    "*": "abab6.5t-chat"
    +

    请求示例

    +
    {
    "model": "gpt-3",
    "messages": [
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ],
    "stream": false
    }
    +

    响应示例

    +
    {
    "id": "03ac4fcfe1c6cc9c6a60f9d12046e2b4",
    "choices": [
    {
    "finish_reason": "stop",
    "index": 0,
    "message": {
    "content": "你好,我是一个由MiniMax公司研发的大型语言模型,名为MM智能助理。我可以帮助回答问题、提供信息、进行对话和执行多种语言处理任务。如果你有任何问题或需要帮助,请随时告诉我!",
    "role": "assistant",
    "name": "MM智能助理",
    "audio_content": ""
    }
    }
    ],
    "created": 1734155471,
    "model": "abab6.5s-chat",
    "object": "chat.completion",
    "usage": {
    "total_tokens": 116,
    "total_characters": 0,
    "prompt_tokens": 70,
    "completion_tokens": 46
    },
    "input_sensitive": false,
    "output_sensitive": false,
    "input_sensitive_type": 0,
    "output_sensitive_type": 0,
    "output_sensitive_int": 0,
    "base_resp": {
    "status_code": 0,
    "status_msg": ""
    }
    }
    +

    使用 OpenAI 协议代理 GitHub 模型服务

    +

    配置信息

    +
    provider:
    type: github
    apiTokens:
    - "YOUR_GITHUB_ACCESS_TOKEN"
    modelMapping:
    "gpt-4o": "gpt-4o"
    "gpt-4": "Phi-3.5-MoE-instruct"
    "gpt-3.5": "cohere-command-r-08-2024"
    "text-embedding-3-large": "text-embedding-3-large"
    +

    请求示例

    +
    {
    "messages": [
    {
    "role": "system",
    "content": "You are a helpful assistant."
    },
    {
    "role": "user",
    "content": "What is the capital of France?"
    }
    ],
    "stream": true,
    "temperature": 1.0,
    "top_p": 1.0,
    "max_tokens": 1000,
    "model": "gpt-4o"
    }
    +

    响应示例

    +
    {
    "choices": [
    {
    "finish_reason": "stop",
    "index": 0,
    "logprobs": null,
    "message": {
    "content": "The capital of France is Paris.",
    "role": "assistant"
    }
    }
    ],
    "created": 1728131051,
    "id": "chatcmpl-AEy7PU2JImdsD1W6Jw8GigZSEnM2u",
    "model": "gpt-4o-2024-08-06",
    "object": "chat.completion",
    "system_fingerprint": "fp_67802d9a6d",
    "usage": {
    "completion_tokens": 7,
    "prompt_tokens": 24,
    "total_tokens": 31
    }
    }
    +

    文本向量请求示例

    +
    {
    "input": ["first phrase", "second phrase", "third phrase"],
    "model": "text-embedding-3-large"
    }
    +

    响应示例:

    +
    {
    "object": "list",
    "data": [
    {
    "object": "embedding",
    "index": 0,
    "embedding": [
    -0.0012583479,
    0.0020349282,
    ...
    0.012051377,
    -0.0053306012,
    0.0060688322
    ]
    }
    ],
    "model": "text-embedding-3-large",
    "usage": {
    "prompt_tokens": 6,
    "total_tokens": 6
    }
    }

    使用 OpenAI 协议代理360智脑服务

    配置信息

    -
    provider:
    type: ai360
    apiTokens:
    - "YOUR_MINIMAX_API_TOKEN"
    modelMapping:
    "gpt-4o": "360gpt-turbo-responsibility-8k"
    "gpt-4": "360gpt2-pro"
    "gpt-3.5": "360gpt-turbo"
    "text-embedding-3-small": "embedding_s1_v1.2"
    "*": "360gpt-pro"
    +
    provider:
    type: ai360
    apiTokens:
    - "YOUR_360_API_TOKEN"
    modelMapping:
    "gpt-4o": "360gpt-turbo-responsibility-8k"
    "gpt-4": "360gpt2-pro"
    "gpt-3.5": "360gpt-turbo"
    "text-embedding-3-small": "embedding_s1_v1.2"
    "*": "360gpt-pro"
    +

    请求示例

    +
    {
    "model": "gpt-4o",
    "messages": [
    {
    "role": "system",
    "content": "你是一个专业的开发人员!"
    },
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ]
    }
    +

    响应示例

    +
    {
    "choices": [
    {
    "message": {
    "role": "assistant",
    "content": "你好,我是360智脑,一个大型语言模型。我可以帮助回答各种问题、提供信息、进行对话等。有什么可以帮助你的吗?"
    },
    "finish_reason": "",
    "index": 0
    }
    ],
    "created": 1724257207,
    "id": "5e5c94a2-d989-40b5-9965-5b971db941fe",
    "model": "360gpt-turbo",
    "object": "",
    "usage": {
    "completion_tokens": 33,
    "prompt_tokens": 24,
    "total_tokens": 57
    },
    "messages": [
    {
    "role": "system",
    "content": "你是一个专业的开发人员!"
    },
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ],
    "context": null
    }
    +

    文本向量请求示例

    +

    URL: http://your-domain/v1/embeddings

    +

    请求示例:

    +
    {
    "input":["你好"],
    "model":"text-embedding-3-small"
    }
    +

    响应示例:

    +
    {
    "data": [
    {
    "embedding": [
    -0.011237,
    -0.015433,
    ...,
    -0.028946,
    -0.052778,
    0.003768,
    -0.007917,
    -0.042201
    ],
    "index": 0,
    "object": ""
    }
    ],
    "model": "embedding_s1_v1.2",
    "object": "",
    "usage": {
    "prompt_tokens": 2,
    "total_tokens": 2
    }
    }

    使用 OpenAI 协议代理 Cloudflare Workers AI 服务

    配置信息

    provider:
    type: cloudflare
    apiTokens:
    - "YOUR_WORKERS_AI_API_TOKEN"
    cloudflareAccountId: "YOUR_CLOUDFLARE_ACCOUNT_ID"
    modelMapping:
    "*": "@cf/meta/llama-3-8b-instruct"
    +

    请求示例

    +
    {
    "model": "gpt-3.5",
    "max_tokens": 1024,
    "messages": [
    {
    "role": "user",
    "content": "Who are you?"
    }
    ]
    }
    +

    响应示例

    +
    {
    "id": "id-1720367803430",
    "object": "chat.completion",
    "created": 1720367803,
    "model": "@cf/meta/llama-3-8b-instruct",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "I am LLaMA, an AI assistant developed by Meta AI that can understand and respond to human input in a conversational manner. I'm not a human, but a computer program designed to simulate conversation and answer questions to the best of my knowledge. I can be used to generate text on a wide range of topics, from science and history to entertainment and culture.\n\nI'm a large language model, which means I've been trained on a massive dataset of text from the internet and can generate human-like responses. I can understand natural language and respond accordingly, making me suitable for tasks such as:\n\n* Answering questions on various topics\n* Generating text based on a given prompt\n* Translating text from one language to another\n* Summarizing long pieces of text\n* Creating chatbot dialogues\n\nI'm constantly learning and improving, so the more conversations I have with users like you, the better I'll become."
    },
    "logprobs": null,
    "finish_reason": "stop"
    }
    ]
    }

    使用 OpenAI 协议代理Spark服务

    配置信息

    provider:
    type: spark
    apiTokens:
    - "APIKey:APISecret"
    modelMapping:
    "gpt-4o": "generalv3.5"
    "gpt-4": "generalv3"
    "*": "general"
    +

    请求示例

    +
    {
    "model": "gpt-4o",
    "messages": [
    {
    "role": "system",
    "content": "你是一名专业的开发人员!"
    },
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ],
    "stream": false
    }
    +

    响应示例

    +
    {
    "id": "cha000c23c6@dx190ef0b4b96b8f2532",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "你好!我是一名专业的开发人员,擅长编程和解决技术问题。有什么我可以帮助你的吗?"
    }
    }
    ],
    "created": 1721997415,
    "model": "generalv3.5",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 10,
    "completion_tokens": 19,
    "total_tokens": 29
    }
    }

    使用 OpenAI 协议代理 gemini 服务

    配置信息

    provider:
    type: gemini
    apiTokens:
    - "YOUR_GEMINI_API_TOKEN"
    modelMapping:
    "*": "gemini-pro"
    geminiSafetySetting:
    "HARM_CATEGORY_SEXUALLY_EXPLICIT" :"BLOCK_NONE"
    "HARM_CATEGORY_HATE_SPEECH" :"BLOCK_NONE"
    "HARM_CATEGORY_HARASSMENT" :"BLOCK_NONE"
    "HARM_CATEGORY_DANGEROUS_CONTENT" :"BLOCK_NONE"
    +

    请求示例

    +
    {
    "model": "gpt-3.5",
    "messages": [
    {
    "role": "user",
    "content": "Who are you?"
    }
    ],
    "stream": false
    }
    +

    响应示例

    +
    {
    "id": "chatcmpl-b010867c-0d3f-40ba-95fd-4e8030551aeb",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "I am a large multi-modal model, trained by Google. I am designed to provide information and answer questions to the best of my abilities."
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1722756984,
    "model": "gemini-pro",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 5,
    "completion_tokens": 29,
    "total_tokens": 34
    }
    }

    使用 OpenAI 协议代理 DeepL 文本翻译服务

    配置信息

    provider:
    type: deepl
    apiTokens:
    - "YOUR_DEEPL_API_TOKEN"
    targetLang: "ZH"
    @@ -658,4 +918,24 @@

    使用 OpenAI 协 此处 model 表示 DeepL 的服务类型,只能填 FreeProcontent 中设置需要翻译的文本;在 role: systemcontent 中可以包含可能影响翻译但本身不会被翻译的上下文,例如翻译产品名称时,可以将产品描述作为上下文传递,这种额外的上下文可能会提高翻译的质量。

    {
    "model": "Free",
    "messages": [
    {
    "role": "system",
    "content": "money"
    },
    {
    "content": "sit by the bank"
    },
    {
    "content": "a bank in China"
    }
    ]
    }

    响应示例

    -
    {
    "choices": [
    {
    "index": 0,
    "message": { "name": "EN", "role": "assistant", "content": "坐庄" }
    },
    {
    "index": 1,
    "message": { "name": "EN", "role": "assistant", "content": "中国银行" }
    }
    ],
    "created": 1722747752,
    "model": "Free",
    "object": "chat.completion",
    "usage": {}
    }

    \ No newline at end of file +
    {
    "choices": [
    {
    "index": 0,
    "message": { "name": "EN", "role": "assistant", "content": "坐庄" }
    },
    {
    "index": 1,
    "message": { "name": "EN", "role": "assistant", "content": "中国银行" }
    }
    ],
    "created": 1722747752,
    "model": "Free",
    "object": "chat.completion",
    "usage": {}
    }
    +

    使用 OpenAI 协议代理 Together-AI 服务

    +

    配置信息

    +
    provider:
    type: together-ai
    apiTokens:
    - "YOUR_TOGETHER_AI_API_TOKEN"
    modelMapping:
    "*": "Qwen/Qwen2.5-72B-Instruct-Turbo"
    +

    请求示例

    +
    {
    "model": "Qwen/Qwen2.5-72B-Instruct-Turbo",
    "messages": [
    {
    "role": "user",
    "content": "Who are you?"
    }
    ]
    }
    +

    响应示例

    +
    {
    "id": "8f5809d54b73efac",
    "object": "chat.completion",
    "created": 1734785851,
    "model": "Qwen/Qwen2.5-72B-Instruct-Turbo",
    "prompt": [],
    "choices": [
    {
    "finish_reason": "eos",
    "seed": 12830868308626506000,
    "logprobs": null,
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "I am Qwen, a large language model created by Alibaba Cloud. I am designed to assist users in generating various types of text, such as articles, stories, poems, and more, as well as answering questions and providing information on a wide range of topics. How can I assist you today?",
    "tool_calls": []
    }
    }
    ],
    "usage": {
    "prompt_tokens": 33,
    "completion_tokens": 61,
    "total_tokens": 94
    }
    }
    +

    完整配置示例

    +

    Kubernetes 示例

    +

    以下以使用 OpenAI 协议代理 Groq 服务为例,展示完整的插件配置示例。

    +
    apiVersion: extensions.higress.io/v1alpha1
    kind: WasmPlugin
    metadata:
    name: ai-proxy-groq
    namespace: higress-system
    spec:
    matchRules:
    - config:
    provider:
    type: groq
    apiTokens:
    - "YOUR_API_TOKEN"
    ingress:
    - groq
    url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ai-proxy:1.0.0
    ---
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
    annotations:
    higress.io/backend-protocol: HTTPS
    higress.io/destination: groq.dns
    higress.io/proxy-ssl-name: api.groq.com
    higress.io/proxy-ssl-server-name: "on"
    labels:
    higress.io/resource-definer: higress
    name: groq
    namespace: higress-system
    spec:
    ingressClassName: higress
    rules:
    - host: <YOUR-DOMAIN>
    http:
    paths:
    - backend:
    resource:
    apiGroup: networking.higress.io
    kind: McpBridge
    name: default
    path: /
    pathType: Prefix
    ---
    apiVersion: networking.higress.io/v1
    kind: McpBridge
    metadata:
    name: default
    namespace: higress-system
    spec:
    registries:
    - domain: api.groq.com
    name: groq
    port: 443
    type: dns
    +

    访问示例:

    +
    Terminal window
    curl "http://<YOUR-DOMAIN>/v1/chat/completions" -H "Content-Type: application/json" -d '{
    "model": "llama3-8b-8192",
    "messages": [
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ]
    }'
    +

    Docker-Compose 示例

    +

    docker-compose.yml 配置文件:

    +
    version: '3.7'
    services:
    envoy:
    image: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/envoy:1.20
    entrypoint: /usr/local/bin/envoy
    # 开启了 debug 级别日志方便调试
    command: -c /etc/envoy/envoy.yaml --component-log-level wasm:debug
    networks:
    - higress-net
    ports:
    - "10000:10000"
    volumes:
    - ./envoy.yaml:/etc/envoy/envoy.yaml
    - ./plugin.wasm:/etc/envoy/plugin.wasm
    networks:
    higress-net: {}
    +

    envoy.yaml 配置文件:

    +
    admin:
    address:
    socket_address:
    protocol: TCP
    address: 0.0.0.0
    port_value: 9901
    static_resources:
    listeners:
    - name: listener_0
    address:
    socket_address:
    protocol: TCP
    address: 0.0.0.0
    port_value: 10000
    filter_chains:
    - filters:
    - name: envoy.filters.network.http_connection_manager
    typed_config:
    "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
    scheme_header_transformation:
    scheme_to_overwrite: https
    stat_prefix: ingress_http
    # Output envoy logs to stdout
    access_log:
    - name: envoy.access_loggers.stdout
    typed_config:
    "@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
    # Modify as required
    route_config:
    name: local_route
    virtual_hosts:
    - name: local_service
    domains: [ "*" ]
    routes:
    - match:
    prefix: "/"
    route:
    cluster: claude
    timeout: 300s
    http_filters:
    - name: claude
    typed_config:
    "@type": type.googleapis.com/udpa.type.v1.TypedStruct
    type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
    value:
    config:
    name: claude
    vm_config:
    runtime: envoy.wasm.runtime.v8
    code:
    local:
    filename: /etc/envoy/plugin.wasm
    configuration:
    "@type": "type.googleapis.com/google.protobuf.StringValue"
    value: | # 插件配置
    {
    "provider": {
    "type": "claude",
    "apiTokens": [
    "YOUR_API_TOKEN"
    ]
    }
    }
    - name: envoy.filters.http.router
    clusters:
    - name: claude
    connect_timeout: 30s
    type: LOGICAL_DNS
    dns_lookup_family: V4_ONLY
    lb_policy: ROUND_ROBIN
    load_assignment:
    cluster_name: claude
    endpoints:
    - lb_endpoints:
    - endpoint:
    address:
    socket_address:
    address: api.anthropic.com # API 服务地址
    port_value: 443
    transport_socket:
    name: envoy.transport_sockets.tls
    typed_config:
    "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
    "sni": "api.anthropic.com"
    +

    访问示例:

    +
    Terminal window
    curl "http://localhost:10000/v1/chat/completions" -H "Content-Type: application/json" -d '{
    "model": "claude-3-opus-20240229",
    "max_tokens": 1024,
    "messages": [
    {
    "role": "user",
    "content": "你好,你是谁?"
    }
    ]
    }'
    \ No newline at end of file diff --git a/docs/latest/plugins/ai/api-provider/ai-security-guard/index.html b/docs/latest/plugins/ai/api-provider/ai-security-guard/index.html index ba5088ce08..be39b84b66 100644 --- a/docs/latest/plugins/ai/api-provider/ai-security-guard/index.html +++ b/docs/latest/plugins/ai/api-provider/ai-security-guard/index.html @@ -33,7 +33,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - + 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件 跳转到内容
    铭师堂的云原生升级实践点此了解
    插件
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN

    活动回顾丨云原生开源开发者沙龙,AI 应用工程化专场

    Release Time 2024-11-12


    + astro-bxjx6km4" data-on="EN" data-off="中文">
    EN

    活动回顾丨云原生开源开发者沙龙,AI 应用工程化专场

    Release Time 2024-11-12


    11 月 08 日,云原生开源开发者沙龙丨AI 应用工程化专场在杭州顺利举办。现场座无虚席,阿里云一线工程师围绕《构建面向 AI 应用可观测能力》、《Java 开发者如何玩转 AI》、《事件驱动构建 AI 原生应用》、《智启未来:通过 AI 网关快速构建智能应用》4 个当下热门议题深入分享,讲师们的精彩演讲引发了现场开发者的强烈共鸣,并积极参与提问和讨论,现场互动氛围十分热烈。活动最后,现场开发者还通过实操环节进一步巩固了所学知识,整个活动充实而富有成效。点击文末阅读原文课可预约沙龙回放视频。

    -

    +

    点击此处可免费获得杭州站讲师 PPT 合辑

    一、精彩回顾

    下面就让我们一起回顾本次活动上都有哪些精彩瞬间。

    分享主题丨构建面向 AI 应用可观测能力

    在当前生成式 AI 热度持续上升的背景下,大模型领域的快速发展不仅催生了新的职业机会,也对系统的可观测性提出了更高要求。阿里云高级技术专家夏明首先概述了从微服务架构向 AI 应用转变过程中所经历的应用模式和技术栈的变化,强调了在这种转型中提升可观测性的重要性及其面临的挑战与需求。接着深入探讨了如何为大模型应用场景设计并实现有效的可观测解决方案,包括具体的设计思路、实施方案以及取得的实际成效。最后分享了对未来发展趋势的看法及团队下一步的工作计划,帮助开发者了解轻松驾驭 AI 应用。

    -

    +

    分享主题丨Java 开发者如何玩转 AI

    Spring AI Alibaba 是基于 Spring AI 构建的 AI 应用框架,它利用 Spring Boot 的便捷性与模块化特性,简化了开发者在集成 AI 能力时的操作流程,还支持一次编码即可轻松切换不同的 AI 服务提供商,让 Java 开发者能够快速接入先进的 AI 技术。本次分享 Spring Cloud Alibaba & Spring AI Alibaba 发起人肖京介绍了 Java 开发者可以如何利用阿里巴巴开源的 AI 框架来开发AI应用,以及该框架在微服务领域的应用和最佳实践,并介绍阿里巴巴开源项目的背景、核心功能和实操案例,强调通过参与开源项目来提升个人技能和职业生涯发展的潜力。

    -

    +

    分享主题丨事件驱动构建 AI 原生应用

    AI 应用在进行商业化服务的阶段会面临诸多挑战,比如更快的服务交付速度,更精准实时的结果以及更人性化的体验等,传统架构限制于同步交互,无法满足上述需求,本次分享阿里云技术专家王庆给大家介绍一下如何基于事件驱动架构应对上述挑战。

    -

    +

    分享主题丨智启未来:通过 AI 网关快速构建智能应用

    网关随着业务形态的变化在持续演进,在 AI 浪潮下 AI 网关应需而生,AI 网关通过集成 AI Prompt Template、AI Proxy、AI 语义缓存、AI 内容安全、AI 意图识别、RAG 等多种技术,开发者只需通过简单配置即可实现AI应用开发、模型训练等。无论是智能客服、推荐系统,还是数据分析,AI 网关都能为企业提供灵活、强大的支持,助力业务快速发展。本次分享 Higress 网关负责人耿蕾蕾介绍了 AI 网关如何促进智能应用的快速构建,并讨论了云原生网关和 AI 网关的发展趋势。

    -

    +

    二、现场照片

    -

    -

    -

    -

    +

    +

    +

    +

    欢迎使用钉钉扫描二维码

    加入本次活动群

    群号:94560019909

    \ No newline at end of file diff --git a/en/blog/higress-gvr7dx_awbbpb_axu7ixyuxqtsbh9v/index.html b/en/blog/higress-gvr7dx_awbbpb_axu7ixyuxqtsbh9v/index.html index 58606676bb..a07f9ccd5d 100644 --- a/en/blog/higress-gvr7dx_awbbpb_axu7ixyuxqtsbh9v/index.html +++ b/en/blog/higress-gvr7dx_awbbpb_axu7ixyuxqtsbh9v/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践Know more

    Higress x Kubesphere 开源沙龙广州站邀您参会

    Release Time 2024-12-20


    欢迎莅临广州市海珠区鼎新路88号广州阿里中心,O-N-10-02 春秋书院。报名成功后,您将在活动前一周收到短信通知。

    -

    +

    一、活动简介

    AI 驱动的应用程序开发、部署和运维,给应用带来了新的生命力和想象空间。但大部分开发者对 AI 应用的编程框架、可观测体系、网关架构的设计和使用依旧不太熟练,生产环境下的工程化实践仍不太丰富。为此我们邀请了深耕 AI 应用工程化的一线研发工程师,分享他们的生产经验,以及 Spring AI Alibaba 和 Higress 等开源项目的最新进展,并通过现场实操加固学习效果。本次活动因场地限制,采取报名审核制度。

    二、详细议程

    -

    \ No newline at end of file +

    \ No newline at end of file diff --git a/en/blog/higress-gvr7dx_awbbpb_bffdbqhfb8r0qih8/index.html b/en/blog/higress-gvr7dx_awbbpb_bffdbqhfb8r0qih8/index.html index 33dc67206d..8b81f2e624 100644 --- a/en/blog/higress-gvr7dx_awbbpb_bffdbqhfb8r0qih8/index.html +++ b/en/blog/higress-gvr7dx_awbbpb_bffdbqhfb8r0qih8/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践Know more

    Higress x Kubesphere 开源沙龙成都站邀您参会

    Release Time 2024-11-14


    AI 驱动的应用程序开发、部署和运维,给应用带来了新的生命力和想象空间。但大部分开发者对 AI 应用的编程框架、可观测体系、网关架构的设计和使用依旧不太熟练,生产环境下的工程化实践仍不太丰富。为此,Higress 联合 Kubesphere 邀请了深耕 AI 应用工程化的一线研发工程师,分享他们的生产经验。本次活动因场地限制,采取报名审核制度。

    -

    \ No newline at end of file +

    \ No newline at end of file diff --git a/en/blog/higress-gvr7dx_awbbpb_bo9gbceraxmft62n/index.html b/en/blog/higress-gvr7dx_awbbpb_bo9gbceraxmft62n/index.html index 0a1411ee4f..0da49623e4 100644 --- a/en/blog/higress-gvr7dx_awbbpb_bo9gbceraxmft62n/index.html +++ b/en/blog/higress-gvr7dx_awbbpb_bo9gbceraxmft62n/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践Know more
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN \ No newline at end of file diff --git a/en/blog/higress-gvr7dx_awbbpb_ghwthc4xkdshgqgp/index.html b/en/blog/higress-gvr7dx_awbbpb_ghwthc4xkdshgqgp/index.html index 2f05185e55..4e4358239b 100644 --- a/en/blog/higress-gvr7dx_awbbpb_ghwthc4xkdshgqgp/index.html +++ b/en/blog/higress-gvr7dx_awbbpb_ghwthc4xkdshgqgp/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践Know more
    \ No newline at end of file +

    \ No newline at end of file diff --git a/en/blog/higress-gvr7dx_awbbpb_gk5nkrhm7uvuulgg/index.html b/en/blog/higress-gvr7dx_awbbpb_gk5nkrhm7uvuulgg/index.html index c1e168cff0..f6f7fe9e72 100644 --- a/en/blog/higress-gvr7dx_awbbpb_gk5nkrhm7uvuulgg/index.html +++ b/en/blog/higress-gvr7dx_awbbpb_gk5nkrhm7uvuulgg/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践Know more
    PLUGIN
    PLUGIN
    \ No newline at end of file diff --git a/en/blog/higress-gvr7dx_awbbpb_gxmuxgfaer0gyu4f/index.html b/en/blog/higress-gvr7dx_awbbpb_gxmuxgfaer0gyu4f/index.html index d458414ad7..e8cbf801e7 100644 --- a/en/blog/higress-gvr7dx_awbbpb_gxmuxgfaer0gyu4f/index.html +++ b/en/blog/higress-gvr7dx_awbbpb_gxmuxgfaer0gyu4f/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践Know more
    PLUGIN
    PLUGIN

    热联集团:从 APISIX 迁移到云原生网关

    Release Time 2024-11-12


    作者:金峰(项良)、朱永林、赵世振(寰奕)
    -

    +

    一、公司简介

    杭州热联集团股份有限公司成立于 1997 年 10 月,是隶属杭州市实业投资集团的国有控股公司。公司专业从事国际、国内钢铁贸易黑色大宗商品及产业服务,业务品种涵盖钢铁原料、钢铁产品及以铜为主的有色金属等。

    2023 年,热联集团实现销售总量 9634 万吨,销售收入 2555 亿元,业绩增长 50%。

    2016-2023 年,公司连续八年蝉联中国钢贸企业百强榜综合榜前三。入选国务院国资委“双百行动”企业名单,以及浙江省政府“凤凰计划”名单,被列入浙江省首批内外贸一体化“领跑者”培育企业。

    目前热联集团的网点建设遍布国内 31 个城市及境外 17 个国家和地区,业务范围覆盖全球 52 个国家和地区。在全球钢铁、橡胶等大宗商品贸易行业,“热联”品牌享有优异的商业信誉和企业形象。

    -

    +

    二、业务高速发展下面临的挑战

    早期,热联自主研发了一系列垂直业务功能系统,包括大宗贸易相关的资金管理和交易系统(如保融资金管理系统、投资系统、量化交易系统等)、企业内部管理相关系统(如 HR 系统、报销系统、企业招投票系统等)、企业经营管理相关系统(如自研 ERP、租赁 SAAS 系统),以及物流交付相关系统(如配送系统、TM、WMS)。这些系统部署在 IDC 的自建 K8S 中,采用微服务架构,通过 Spring Cloud + Nacos 实现微服务应用间的远程调用和服务发现,并使用 APISIX 作为南北向网关,实现统一的认证、鉴权和入口流量管控。

    -

    +

    然而,随着业务的迅速发展和品牌的日益壮大,原有的技术架构逐渐显露出多方面的瓶颈和挑战:

    1. 软件迭代效率低下:由于所有业务都部署在 IDC 中,每次新业务上线或系统扩容时都需要经过复杂的招采流程,导致交付周期漫长,业务人员对效率问题怨声载道,运维人员也倍感压力。
    2. @@ -49,36 +49,36 @@

      灵活性至上,符合业界的主流规范、兼容开源,且提供较强的开放能力,企业可以根据自身的具体情况和标准自主定制,不受平台限制。

    最终,热联在阿里云的专家团队的帮助下,找到了一条相对可行的解决路径,阿里云提出的全栈上云+云原生解决方案不仅可以满足热联提出的所有研发、运维和稳定的要求,还为企业未来的技术发展提供了强大的支持和灵活的扩展性。

    -

    +

    热联的核心业务系统从 IDC 全栈迁移到阿里云后,稳定性提升了 100%、研发效率提升了 30%、综合成本下降了 50%

    -

    +

    三、微服务架构的性能与稳定性提升

    为了提升研发效率和稳定性、热联的核心业务系统都是微服务架构,开发语言以 Java 为主,并且全面拥抱了 Spring Cloud 的生态。一直以来热联对微服务技术都有比较高的追求。因此在云平台的选型上,微服务技术的相关产品需要满足高开放性、高成熟度、高普及度、高可用,四条标准缺一不可。

    阿里云上的 MSE(微服务引擎)源自阿里巴巴微服务架构的最佳实践,是一个面向业界主流开源微服务生态的一站式微服务平台,提供注册配置中心、云原生网关、微服务治理和分布式任务调度能力。在高可用性方面自 08 年诞生以来历经了多年双十一考验。云上的商业化产品均是多可用区容灾架构,承诺可用性 SLA 99.95%。在高成熟度和高普及度方面,MSE 的注册中心 Nacos 和云原生网关 Higress 在开源社区都有比较强的影响力,并且产品的创始人团队稳定,出现问题后能第一时间找到专业的技术人员兜底。

    -

    +

    因此,MSE 的 Nacos 和云原生网关就成了微服务技术平替的最佳选择。

    APISIX 迁移到云原生网关

    首先是网关的迁移,阿里的专家们在充分了解的热联 APISIX 的用法后,针对与我们目前 APISIX 上的所有功能用法,云原生网关都给出了功能对标文档和使用实践。

    -

    +

    在迁移测试过程中,阿里的专家们,针对与我们提出的任何问题都能第一时间响应并快速解决问题,最典型的是在自定义认证鉴方面,原有热联使用的是 APISIX 的 forward-auth,forward-auth 插件实现鉴权比较灵活,用户可以任意定义鉴权服务并暴露鉴权服务的 url,然后鉴权完成后,可以通过 request header 把 clientip、目标路由的 url、token 都传递下去,而现有云原生网关默认的自定义鉴权无办法很好的满足需求,如果想用起来需要我们做一些代码改动。在了解到了我们的问题以后,阿里的专家们只用了 2 天时间就为我们提供了成熟且稳定的 ext-auth 插件,用于实现个性化的自定义鉴权。

    在完成所有功能验证后,热联准备把全部流量迁移到云原生网关时,阿里的专家们为我们提供了平滑切流方案。

    -

    +

    通过 DNS weight 的方式热联把所有网关流量都切到了云原生网关以后,再也没有出现过莫名其妙崩溃的问题,网关的可用性达到了 100%。为什么能够取得这么好的结果呢?主要得益于以下几点:

    1. 云原生网关孵化自阿里内部,经过历年大促的验证,积累了一套高可用保障方案,从研发时、运行时、变更时来控制风险提升稳定性,在每个阶段各自有手段去保证其高可用目标。

    -

    +

    2. 可扩展性对于软件的重要性毋庸置疑,相比 APISIX 使用的 Lua 扩展机制,云原生网关既可以支持 Lua 扩展,同时也支持 Wasm(WebAssembly)扩展,Wasm 插件天然支持 C++、Rust、Golang、JS 等多语言编写,原生提供插件热插拔与插件配置热更新能力,毫秒级生效,配置变更对长连接无损,且 Wasm 插件运行在安全沙箱中,插件自身的漏洞或者异常崩溃不会影响网关宿主进程,对于异常崩溃的插件也提供了自恢复机制,无需人工干预。

    -

    +

    在性能上,目前随着网络安全愈加受重视,现在互联网上已经普遍使用 HTTPS 进行传输加密,在网关侧,用于实现 HTTPS 的 TLS 非对称加密算法是占用 CPU 资源的大头。针对此场景,云原生网关使用了 CPU SIMD 技术实现了 TLS 加解密算法的硬件加速,通过压测数据表明云原生网关采用软硬一体的加速方案相比普通 HTTPS 请求 TLS 握手时延降低一倍,极限 QPS 提升 80% 以上。

    -

    +

    在运维效率上,整体提升了 50%,这主要得益于云原生网关本身是全托管、免运维的。无论实例的开通还是版本的升级亦或是规格的扩缩容都很方便,同时又提供了定时+按指标的弹性能力。令人惊喜的是云原生网关同阿里云上的数字证书管理、注册中心、微服务治理、ARMS、SLS 等产品都做了深度极成。

    尤其是可观测方面,云原生网关提供了丰富的可观测数据,包括流量全局看板、日志检索、业务 TOP 榜、延迟/失败率/错误码等多种响应指标等,并辅以报警管理,使运维人员对服务的整体状态及异常情况尽在掌握。

    -

    +

    开源 Nacos 迁移 MSE

    热联通过 MSE SYNC 工具,把开源的 NACOS 服务都平滑的迁移到了商业版上面。

    -

    +

    相较开源版的 Nacos,商业版产品在稳定性、性能和运维成本等方面都具备了明显的优势,这也极大的解放了研发和运维人员的生产力,让我们能更加专注业到务开发和运维上。

    -

    +

    四、未来展望

    热联集团在进行了云原生架构的升级与探索后,显著提升了业务系统的稳定性和敏捷性。这一转变不仅为公司冲击更高的销售目标奠定了坚实的技术基础,也标志着热联在数字化转型道路上迈出了关键一步。通过采用微服务、容器化等先进技术手段,热联能够更加灵活地响应市场变化,快速迭代产品和服务,满足客户日益增长的需求。

    diff --git a/en/blog/higress-gvr7dx_awbbpb_im44tpldqyt8c97d/index.html b/en/blog/higress-gvr7dx_awbbpb_im44tpldqyt8c97d/index.html index b531e72f0e..12aa35dec4 100644 --- a/en/blog/higress-gvr7dx_awbbpb_im44tpldqyt8c97d/index.html +++ b/en/blog/higress-gvr7dx_awbbpb_im44tpldqyt8c97d/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践Know more
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN

    应用网关的演进历程和分类

    Release Time 2024-11-06


    唯一不变的是变化,在现代复杂的商业环境中,企业的业务形态与规模往往处于不断变化和扩大之中。这种动态发展对企业的信息系统提出了更高的要求,特别是在软件架构方面。为了应对不断变化的市场需求和业务扩展,软件架构必须进行相应的演进和优化。网关作为互联网流量的入口,其形态也在跟随软件架构持续演进迭代中。我们下面就聊一聊网关的演进历程以及在时下火热的AI浪潮下,网关又会迸发怎样新的形态。

    网关演进形态概览

    软件架构的演进是一个不断适应技术发展和业务需求变化的过程,伴随着软件架构的演进网关的形态也在随之持续迭代,在不同软件架构阶段中网关也呈现其不同的形态。

    -

    +

    软件架构的演进是技术发展和业务需求不断推动的结果,从早期的简单设计到如今复杂的多层次架构,体现了软件系统在可扩展性、维护性和性能方面的不断追求。

    1. 单体架构:在软件工程的初期,单体架构是最常见的形式。所有的功能模块都集成在一个整体应用中。这种架构的优点是初期开发和部署比较简单,但随着系统功能的扩展和复杂性增加,维护和升级变得越来越困难,单点故障的风险也越来越高。
    2. @@ -39,28 +39,28 @@

      网关演进

      总体来看,软件架构演进的每一步都在寻求解决当前架构的瓶颈和不足,通过技术创新和最佳实践,使得软件系统能够更好地应对不断变化的业务需求和技术环境。

      网关演进之流量网关

      流量网关作为网络架构中的关键组件,主要负责管理和优化数据流量,以提升业务的可伸缩性和高可用性。 Nginx 作为流量网关的代表性软件,以其高效的性能和灵活的配置广受欢迎。流量网关的核心目的是解决多业务节点的流量负载均衡问题,通过智能调度将客户请求分配到不同的服务器上,从而均匀分摊负载,避免单点故障,确保服务的稳定性和连续性。

      -

      +

      网关演进之ESB

      企业服务总线(ESB)网关是一个专为企业设计的关键集成解决方案,旨在标准化和简化不同系统和服务之间的通信与消息传送。作为核心通信基础设施,ESB网关可以减少系统间的耦合性,提高互操作性和灵活性,确保数据和服务的无缝整合。遵循服务导向型架构(SOA)原则,ESB 通过集中管理消息路由、转换和安全,实现服务的快速部署和高效运作。它支持不同协议和数据格式,提升了系统的扩展性和可维护性,帮助企业在不断变化的业务环境中保持竞争力与创新。

      -

      +

      网关演进之微服务网关

      微服务网关是微服务架构中的关键组件,负责集中管理微服务的路由规则,增强系统安全性,提供性能监控,并简化访问流程,从而提高整个系统的可靠性。微服务网关可以实现负载均衡、限流、熔断、身份验证等功能,通过统一入口管理和优化各微服务间的交互。此举不仅简化了客户端与微服务的通信复杂性,还为系统安全提供了额外的保护,Spring Cloud Gateway 是一个广泛应用的微服务网关,它基于 Spring 生态系统,易于与 Spring Boot 项目集成,因其灵活、高效和可扩展性受到了开发者的青睐。

      -

      +

      网关演进之云原生网关

      云原生网关是伴随 K8s 的广泛应用而诞生的一种创新网关,K8s 集群内外网络天然隔离的特性要求通过网关来将外部请求转发给集群内部服务,K8s 采用 Ingress/Gateway API 来统一网关的配置方式,同时 K8s 提供了弹性扩缩容来帮助用户解决应用容量调度问题,基于此用户对网关产生了新的诉求:期望网关既能有流量网关的特性来处理海量请求,又具备微服务网关的特性来做服务发现与服务治理,同时要求网关也具备弹性扩缩容能力解决容量调度问题,能够让开发者能够专注于业务逻辑的实现,而无需担心底层架构的容量、维护和管理。

      -

      +

      网关演进的下一站:AI网关

      AI 网关是专为处理 AI 流量设计的关键组件,具备长连接、大带宽、高延时的特性,能够高效管理和优化数据传输。在 AI 应用、AI 平台和大型语言模型(LLM)中,不同的场景对 AI 网关的性能和功能有着多样化的需求。为更好地满足这些需求,AI 网关提供了丰富的AI插件集,开发者可以通过低代码方式轻松集成和构建复杂的 AI 应用。这不仅大幅降低了开发难度,还显著提高了效率,使得 AI 技术在各类应用和平台中更加易用和普及。AI 网关因此成为推动AI创新和应用落地的核心推动力。

      -

      +

      API网关去哪了?

      读到这里的同学可能会有这么一个问题:API 网关去哪了?我们耳熟能详的API网关为什么没有提到呢?回答这个问题之前我们可以先问自己一个问题:API 是什么?API 包含什么?

      在流量网关中我们配置的路由本身也是一种API,只是没有定义规范的请求/响应标准而已,通常我们称为 HTTP API,在 AWS API Gateway 中的 HTTP API 指的就是这个,目前 HTTP API 使用最简单、应用最广;REST API 相信大家基本都或多或少听说过,它采用 JSON 格式来规范请求/响应,在微服务网关中应用较广;Websocket/gRPC/Dubbo API这 些相信大家同样不会陌生,因此可以说支持 API 访问的都是 API 网关,API 网关是贯穿软件架构演进的各个阶段。时间来到了当下,在 AI 浪潮下 API 网关又会迸发出怎样新的特性呢?

      -

      +

      Higress:AI 原生的 API 网关

      Higress 源自阿里巴巴内部电商、交易等核心生产场景的实践沉淀,遵循 Ingress/Gateway API 标准,将流量网关、微服务网关、安全网关三合一,并在此基础上扩展了服务管理插件、安全类插件和自定义插件,高度集成 K8s 和微服务生态,包括 Nacos 注册和配置、Sentinel 限流降级等能力,并支持规则变更毫秒级生效等热更新能力。

      在 AI 浪潮下,Higress 面向 AI Native 场景提供原生扩展能力以满足复杂的 AI 应用需求。它不仅支持常见的API管理、流量控制和安全策略,还具备与 AI 模型无缝集成的特性。Higress通过灵活的插件机制,允许开发者轻松添加自定义功能,提升扩展性和适应不同应用场景的能力。借助高性能的处理能力和智能流量调度,Higress 网关可以显著减少延迟,提升 AI 服务的响应速度。此外,Higress 强大的监控和日志功能,帮助开发者快速定位和解决问题,使 AI 应用的开发和运维变得更加高效和可靠。

      -

      +

      本文整理自《统一多层网关架构视频课程》的第一期视频,下载课程PPT和查看回放请点击下载课程 PPT 查看回放

      更多课程

      -

    \ No newline at end of file +

    \ No newline at end of file diff --git a/en/blog/higress-gvr7dx_awbbpb_tdx29ymg8tenqszi/index.html b/en/blog/higress-gvr7dx_awbbpb_tdx29ymg8tenqszi/index.html index b98dc2e54f..38519e01f1 100644 --- a/en/blog/higress-gvr7dx_awbbpb_tdx29ymg8tenqszi/index.html +++ b/en/blog/higress-gvr7dx_awbbpb_tdx29ymg8tenqszi/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践Know more
    PLUGIN
    PLUGIN
    PLUGIN

    Higress@深圳,AI 应用企业开发者沙龙邀您参会

    Release Time 2024-11-26


    + astro-bxjx6km4" data-on="EN" data-off="中文">
    EN

    Higress@深圳,AI 应用企业开发者沙龙邀您参会

    Release Time 2024-11-26


    邀您一起交流,探索 AI 原生应用的工程化落地!

    一、活动简介

    Al 驱动的应用程序开发、部署和运维,给应用带来了新的生命力和想象空间。但大部分企业、尤其是中小型企业对 Al 应用的编程框架、可观测体系、网关架构的设计和使用依旧不太熟练,生产环境下的工程化实践仍不太丰富。为此我们邀请了深耕 Al 应用工程化的一线研发工程师,分享他们的生产经验,以及 Spring Al Alibaba 和 Higress 等开源项目的最新进展,并通过现场实操加固学习效果。本次活动因场地限制,采取报名审核制度,现场完成实操(需携带电脑),颁发专属证书。

    @@ -33,6 +33,6 @@
  • 活动地址:https://hd.aliyun.com/form/5292
  • 二、详细议程

    -

    +

    三、往期回顾

    -

    \ No newline at end of file +

    \ No newline at end of file diff --git a/en/blog/higress-gvr7dx_awbbpb_uddq0l7v5a5vadc6/index.html b/en/blog/higress-gvr7dx_awbbpb_uddq0l7v5a5vadc6/index.html index e2f26fb7d1..7dacf87a0d 100644 --- a/en/blog/higress-gvr7dx_awbbpb_uddq0l7v5a5vadc6/index.html +++ b/en/blog/higress-gvr7dx_awbbpb_uddq0l7v5a5vadc6/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践Know more
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    \ No newline at end of file diff --git a/en/blog/higress-gvr7dx_awbbpb_xdxim253zzta4bun/index.html b/en/blog/higress-gvr7dx_awbbpb_xdxim253zzta4bun/index.html index 14e483d6f6..a108011104 100644 --- a/en/blog/higress-gvr7dx_awbbpb_xdxim253zzta4bun/index.html +++ b/en/blog/higress-gvr7dx_awbbpb_xdxim253zzta4bun/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +
    铭师堂的云原生升级实践Know more
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    PLUGIN
    About Higress
    Higress Cloud
    One click to start your Higress Cloud journey!
    For developer
    ¥0.826 From RMB/hour
    Development and testing environments for the public cloud
    apigw.dev.x1
    Maximum number of client side connections: 24000
    Maximum number of new HTTPS connections per second: 800
    Maximum short connection QPS: 1700
    Maximum long connection QPS: 2200
    No SLA guarantee
    Compatible with open source, the product features are the same as the production version, but SLA is not guaranteed.
    Production Edition
    ¥1.935 From RMB/hour
    Applicable to all environments in the public cloud (development, testing, production)
    apigw.small.x1
    Maximum number of client side connections: 48000
    Maximum number of new HTTPS connections per second: 1600
    Maximum short connection QPS: 3400
    Maximum long connection QPS: 4400
    SLA:99.99%
    Compatible with open source, providing high availability, default security, maximum performance, complete observability, and easier-to-use automated operation and maintenance services
    Freetier
    Free

    Development and testing environments for the public cloud
    Compatible with open source, the product features are the same as the production version, but SLA is not guaranteed.
    For developer
    ¥249.6 /Starting from the month

    Development and testing environments for the public cloud
    Compatible with open source, providing high availability, default security, highest performance, complete observability, and more user-friendly automated operation and maintenance services
    1. Enjoy a 40% discount on the first purchase of the effect package, saving 178 yuan/month compared with post-payment
    2. Effect package renewal, saving 345 yuan/month compared with post-payment
    Production Edition
    ¥585 /Starting from the month

    Applicable to all environments in the public cloud (development, testing, production)
    Compatible with open source, providing high availability, default security, maximum performance, complete observability, and easier-to-use automated operation and maintenance services
    1. Enjoy a 40% discount on the first purchase of the effect package, saving 808 yuan/month compared with post-payment
    2. Effect package renewal, saving 418 yuan/month compared with post-payment
    不同版本功能对比

    社区版

    免费

    开发版

    后付费:0.826元/小时起

    apigw.dev.x1

    最大客户端连接数:24000

    最大 HTTPS 每秒新建连接数:800

    最大短连接 QPS:1700

    最大长连接 QPS:2200

    无 SLA 保障

    资源包:249.6元/月起

    1. 首次购买资源包享受6折优惠,比后付费节省178元/月

    2. 资源包续费,比后付费节省345元/月

    生产版

    后付费:1.935元/小时起

    apigw.small.x1

    最大客户端连接数:48000

    最大 HTTPS 每秒新建连接数:1600

    最大短连接 QPS:3400

    最大长连接 QPS:4400

    SLA:99.99%

    资源包:585元/月起

    1. 首次购买资源包享受6折优惠,比后付费节省808元/月

    2. 资源包续费,比后付费节省418元/月

    易用性

    自动化运维

    免运维

    多种服务发现能力

    自行实现

    支持 K8s、Nacos、Zookeeper、DNS、固定IP及其他云产品

    支持 K8s、Nacos、Zookeeper、DNS、固定IP及其他云产品

    协议自动转化(HTTPS转Dubbo)

    RAM鉴权和权限管理

    云产品集成

    和阿里云 MSE 注册配置、微服务治理等产品深度集成

    和阿里云 MSE 注册配置、微服务治理等产品深度集成

    可用性

    SLA

    99.95%

    99.9%

    多节点容灾

    多可区容灾

    推空保护

    过载保护

    限流降级

    全局限流,需要自建 Redis

    故障自动检测和恢复

    自动扩缩容

    内置扩容上限,避免恶意攻击导致资损

    安全性

    IP黑白名单

    消费者鉴权

    全局认证及鉴权

    Waf防护

    开源方案,静态规则

    商业方案,动态运营规则

    商业方案,动态运营规则

    性能

    HTTPS 请求吞吐量提升

    自行调优

    86%

    软硬一体技术和 Envoy 内核调优

    86%

    软硬一体技术和 Envoy 内核调优

    RT 下降

    自行调优

    86%

    软硬一体技术和 Envoy 内核调优

    86%

    软硬一体技术和 Envoy 内核调优

    可观测性

    基础监控

    (基于 Prometheus + Grafana 的监控套件)

    高级监控

    (可对QPS、请求耗时、后端服务成功率等指标进行监控)

    自定义告警

    (通过钉钉、电话、短信等告警渠道)

    易用性
    可用性
    安全性
    性能
    可观测性
    About Higress
    Higress Cloud
    One click to start your Higress Cloud journey!
    For developer
    ¥0.826 From RMB/hour
    Development and testing environments for the public cloud
    apigw.dev.x1
    Maximum number of client side connections: 24000
    Maximum number of new HTTPS connections per second: 800
    Maximum short connection QPS: 1700
    Maximum long connection QPS: 2200
    No SLA guarantee
    Compatible with open source, the product features are the same as the production version, but SLA is not guaranteed.
    Production Edition
    ¥1.935 From RMB/hour
    Applicable to all environments in the public cloud (development, testing, production)
    apigw.small.x1
    Maximum number of client side connections: 48000
    Maximum number of new HTTPS connections per second: 1600
    Maximum short connection QPS: 3400
    Maximum long connection QPS: 4400
    SLA:99.99%
    Compatible with open source, providing high availability, default security, maximum performance, complete observability, and easier-to-use automated operation and maintenance services
    Freetier
    Free

    Development and testing environments for the public cloud
    Compatible with open source, the product features are the same as the production version, but SLA is not guaranteed.
    For developer
    ¥249.6 /Starting from the month

    Development and testing environments for the public cloud
    Compatible with open source, providing high availability, default security, highest performance, complete observability, and more user-friendly automated operation and maintenance services
    1. Enjoy a 40% discount on the first purchase of the effect package, saving 178 yuan/month compared with post-payment
    2. Effect package renewal, saving 345 yuan/month compared with post-payment
    Production Edition
    ¥585 /Starting from the month

    Applicable to all environments in the public cloud (development, testing, production)
    Compatible with open source, providing high availability, default security, maximum performance, complete observability, and easier-to-use automated operation and maintenance services
    1. Enjoy a 40% discount on the first purchase of the effect package, saving 808 yuan/month compared with post-payment
    2. Effect package renewal, saving 418 yuan/month compared with post-payment
    不同版本功能对比

    社区版

    免费

    开发版

    后付费:0.826元/小时起

    apigw.dev.x1

    最大客户端连接数:24000

    最大 HTTPS 每秒新建连接数:800

    最大短连接 QPS:1700

    最大长连接 QPS:2200

    无 SLA 保障

    资源包:249.6元/月起

    1. 首次购买资源包享受6折优惠,比后付费节省178元/月

    2. 资源包续费,比后付费节省345元/月

    生产版

    后付费:1.935元/小时起

    apigw.small.x1

    最大客户端连接数:48000

    最大 HTTPS 每秒新建连接数:1600

    最大短连接 QPS:3400

    最大长连接 QPS:4400

    SLA:99.99%

    资源包:585元/月起

    1. 首次购买资源包享受6折优惠,比后付费节省808元/月

    2. 资源包续费,比后付费节省418元/月

    易用性

    自动化运维

    免运维

    多种服务发现能力

    自行实现

    支持 K8s、Nacos、Zookeeper、DNS、固定IP及其他云产品

    支持 K8s、Nacos、Zookeeper、DNS、固定IP及其他云产品

    协议自动转化(HTTPS转Dubbo)

    RAM鉴权和权限管理

    云产品集成

    和阿里云 MSE 注册配置、微服务治理等产品深度集成

    和阿里云 MSE 注册配置、微服务治理等产品深度集成

    可用性

    SLA

    99.95%

    99.9%

    多节点容灾

    多可区容灾

    推空保护

    过载保护

    限流降级

    全局限流,需要自建 Redis

    故障自动检测和恢复

    自动扩缩容

    内置扩容上限,避免恶意攻击导致资损

    安全性

    IP黑白名单

    消费者鉴权

    全局认证及鉴权

    Waf防护

    开源方案,静态规则

    商业方案,动态运营规则

    商业方案,动态运营规则

    性能

    HTTPS 请求吞吐量提升

    自行调优

    86%

    软硬一体技术和 Envoy 内核调优

    86%

    软硬一体技术和 Envoy 内核调优

    RT 下降

    自行调优

    86%

    软硬一体技术和 Envoy 内核调优

    86%

    软硬一体技术和 Envoy 内核调优

    可观测性

    基础监控

    (基于 Prometheus + Grafana 的监控套件)

    高级监控

    (可对QPS、请求耗时、后端服务成功率等指标进行监控)

    自定义告警

    (通过钉钉、电话、短信等告警渠道)

    易用性
    可用性
    安全性
    性能
    可观测性

    友情链接: diff --git a/en/docs/developers/committer-guide/label-an-issue-guide_dev/index.html b/en/docs/developers/committer-guide/label-an-issue-guide_dev/index.html index 66f33fcb6f..98ea79c7f4 100644 --- a/en/docs/developers/committer-guide/label-an-issue-guide_dev/index.html +++ b/en/docs/developers/committer-guide/label-an-issue-guide_dev/index.html @@ -33,7 +33,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - + Skip to content

    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more

    AI Token Rate Limiting

    Function Description

    The ai-token-ratelimit plugin implements token rate limiting based on specific key values. The key values can come from URL parameters, HTTP request headers, client IP addresses, consumer names, or key names in cookies.

    -

    Notice

    -

    For this plugin to function, the AI Observability Plugin must also be enabled to achieve token count statistics.

    Runtime Attributes

    Plugin execution phase: default phase
    Plugin execution priority: 600

    diff --git a/en/docs/latest/plugins/ai/api-dev/ai-agent/index.html b/en/docs/latest/plugins/ai/api-dev/ai-agent/index.html index cd80b68691..8170a39887 100644 --- a/en/docs/latest/plugins/ai/api-dev/ai-agent/index.html +++ b/en/docs/latest/plugins/ai/api-dev/ai-agent/index.html @@ -33,7 +33,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - + Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more

    AI Proxy

    Function Description

    -

    AI Proxy plugin implements AI proxy functionality based on OpenAI API contracts. It currently supports AI service providers such as OpenAI, Azure OpenAI, Moonshot, and Qwen.

    +

    AI Proxy

    Function Description

    +

    The AI Proxy plugin implements AI proxy functionality based on the OpenAI API contract. It currently supports AI service providers such as OpenAI, Azure OpenAI, Moonshot, and Qwen.

    -

    Note: -When the request path suffix matches /v1/chat/completions, corresponding to text generation scenarios, the request body will be parsed using OpenAI’s text generation protocol and then converted to the corresponding LLM vendor’s text generation protocol.

    -

    When the request path suffix matches /v1/embeddings, corresponding to text vector scenarios, the request body will be parsed using OpenAI’s text vector protocol and then converted to the corresponding LLM vendor’s text vector protocol.

    +

    Note:

    -

    Running Attributes

    -

    Plugin execution phase: Default phase
    +

    +

    When the request path suffix matches /v1/chat/completions, it corresponds to text-to-text scenarios. The request body will be parsed using OpenAI’s text-to-text protocol and then converted to the corresponding LLM vendor’s text-to-text protocol.

    +
    +
    +

    When the request path suffix matches /v1/embeddings, it corresponds to text vector scenarios. The request body will be parsed using OpenAI’s text vector protocol and then converted to the corresponding LLM vendor’s text vector protocol.

    +
    +

    Execution Properties

    +

    Plugin execution phase: Default Phase Plugin execution priority: 100

    Configuration Fields

    Basic Configuration

    @@ -88,8 +92,8 @@

    Basic Configuration

    -
    NameData TypeRequirementDefault ValueDescription
    providerobjectRequired-Information about the target AI service provider
    -

    The description of fields in provider is as follows:

    +
    NameData TypeRequirementDefaultDescription
    providerobjectRequired-Configures information for the target AI service provider
    +

    Details for the provider configuration fields:

    @@ -151,8 +155,8 @@

    Basic Configuration

    -
    NameData TypeRequirementDefault ValueDescription
    typestringRequired-Name of the AI service provider
    apiTokensarray of stringOptional-Tokens for authentication when accessing the AI service. If multiple tokens are provided, the plugin will randomly choose one when making requests. Some service providers only support one token configuration.
    timeoutnumberOptional-Timeout for accessing the AI service, in milliseconds. The default value is 120000, which is 2 minutes.
    modelMappingmap of stringOptional-AI model mapping table for mapping model names in requests to supported model names by the service provider.
    1. Supports prefix matching. For example, “gpt-3-” matches all models whose names start with “gpt-3-”;
    2. Supports using "
    " as a key to configure a general fallback mapping;
    3. If the target name in the mapping is an empty string "", it means to retain the original model name.
    protocolstringOptional-The API interface contract provided by the plugin. Currently supports the following values: openai (default, uses OpenAI’s interface contract), original (uses the original interface contract of the target service provider)
    contextobjectOptional-Configuration for AI conversation context information
    customSettingsarray of customSettingOptional-Specify override or fill parameters for AI requests
    -

    The description of fields in context is as follows:

    +
    NameData TypeRequirementDefaultDescription
    typestringRequired-Name of the AI service provider
    apiTokensarray of stringOptional-Tokens used for authentication when accessing AI services. If multiple tokens are configured, the plugin randomly selects one for each request. Some service providers only support configuring a single token.
    timeoutnumberOptional-Timeout for accessing AI services, in milliseconds. The default value is 120000, which equals 2 minutes.
    modelMappingmap of stringOptional-Mapping table for AI models, used to map model names in requests to names supported by the service provider.
    1. Supports prefix matching. For example, “gpt-3-” matches all model names starting with “gpt-3-”;
    2. Supports using "
    " as a key for a general fallback mapping;
    3. If the mapped target name is an empty string "", the original model name is preserved.
    protocolstringOptional-API contract provided by the plugin. Currently supports the following values: openai (default, uses OpenAI’s interface contract), original (uses the raw interface contract of the target service provider)
    contextobjectOptional-Configuration for AI conversation context information
    customSettingsarray of customSettingOptional-Specifies overrides or fills parameters for AI requests
    +

    Details for the context configuration fields:

    @@ -186,8 +190,8 @@

    Basic Configuration

    -
    NameData TypeRequirementDefault ValueDescription
    fileUrlstringRequired-URL of the file that stores AI conversation context. Only pure text file content is supported.
    serviceNamestringRequired-The complete name of the Higress backend service corresponding to the URL.
    servicePortnumberRequired-The access port of the Higress backend service corresponding to the URL.
    -

    The description of fields in customSettings is as follows:

    +
    NameData TypeRequirementDefaultDescription
    fileUrlstringRequired-File URL to save AI conversation context. Only supports file content of plain text type
    serviceNamestringRequired-Full name of the Higress backend service corresponding to the URL
    servicePortnumberRequired-Port for accessing the Higress backend service corresponding to the URL
    +

    Details for the customSettings configuration fields:

    @@ -228,8 +232,8 @@

    Basic Configuration

    -
    NameData TypeRequirementDefault ValueDescription
    namestringRequired-Name of the parameter to set, e.g., max_tokens
    valuestring/int/float/boolRequired-Value for the parameter to set, e.g., 0
    modestringOptional”auto”Mode for parameter settings, can be set to “auto” or “raw”. If “auto”, parameter names will be automatically rewritten based on the protocol; if “raw”, no rewriting or validation checks will be done.
    overwriteboolOptionaltrueIf false, the parameter will only be filled if the user hasn’t set it; otherwise, it will overwrite the user’s original parameter settings.
    -

    Custom settings will follow the table below to replace corresponding fields based on name and protocol. Users need to fill in values that exist in the settingName column of the table. For example, if the user sets name to max_tokens, it will be replaced by max_tokens in the OpenAI protocol, and by maxOutputTokens in Gemini. none indicates that the protocol does not support this parameter. If name is not in this table or the corresponding protocol does not support this parameter, and if raw mode is not set, the configuration will not take effect.

    +
    NameData TypeRequirementDefaultDescription
    namestringRequired-Name of the parameter to set, e.g., max_tokens
    valuestring/int/float/boolRequired-Value of the parameter to set, e.g., 0
    modestringOptional”auto”Mode for setting the parameter, can be set to “auto” or “raw”; if “auto”, the parameter name will be automatically rewritten based on the protocol; if “raw”, no rewriting or restriction checks will be applied
    overwriteboolOptionaltrueIf false, the parameter is only filled if the user has not set it; otherwise, it directly overrides the user’s existing parameter settings
    +

    The custom-setting adheres to the following table, replacing the corresponding field based on name and protocol. Users need to fill in values from the settingName column that exists in the table. For instance, if a user sets name to max_tokens, in the openai protocol, it replaces max_tokens; for gemini, it replaces maxOutputTokens. "none" indicates that the protocol does not support this parameter. If name is not in this table or the corresponding protocol does not support the parameter, and “raw” mode is not set, the configuration will not take effect.

    @@ -302,11 +306,11 @@

    Basic Configuration

    settingNameopenaibaidusparkqwengeminihunyuanclaudeminimax
    max_tokensmax_tokensmax_output_tokensmax_tokensmax_tokensmaxOutputTokensnonemax_tokenstokens_to_generate
    temperaturetemperaturetemperaturetemperaturetemperaturetemperatureTemperaturetemperaturetemperature
    top_ptop_ptop_pnonetop_ptopPTopPtop_ptop_p
    top_knonenonetop_knonetopKnonetop_knone
    seedseednonenoneseednonenonenonenone
    -

    If raw mode is enabled, custom settings will directly use the input name and value to change the JSON content of the request without any restrictions or modifications to the parameter names.

    -

    For most protocols, custom settings will modify or fill parameters at the root path of the JSON content. For the qwen protocol, the ai-proxy will configure under the parameters sub-path in JSON. For the gemini protocol, it will be configured under the generation_config sub-path.

    -

    Provider-Specific Configuration

    +

    If raw mode is enabled, custom-setting will directly alter the JSON content using the input name and value, without any restrictions or modifications to the parameter names. +For most protocols, custom-setting modifies or fills parameters at the root path of the JSON content. For the qwen protocol, ai-proxy configures under the parameters subpath. For the gemini protocol, it configures under the generation_config subpath.

    +

    Provider-Specific Configurations

    OpenAI

    -

    The type corresponding to OpenAI is openai. Its specific configuration fields are as follows:

    +

    For OpenAI, the corresponding type is openai. Its unique configuration fields include:

    @@ -333,11 +337,9 @@

    OpenAI

    -
    NameData TypeRequirementDefault ValueDescription
    openaiCustomUrlstringOptional-Custom backend URL based on OpenAI protocol, e.g., www.example.com/myai/v1/chat/completions
    responseJsonSchemaobjectOptional-Predefined Json Schema that OpenAI responses must satisfy, currently only supported by specific models.
    +
    NameData TypeRequirementDefaultDescription
    openaiCustomUrlstringOptional-Custom backend URL based on the OpenAI protocol, e.g., www.example.com/myai/v1/chat/completions
    responseJsonSchemaobjectOptional-Predefined Json Schema that OpenAI responses must adhere to; note that currently only a few specific models support this usage

    Azure OpenAI

    -

    The type corresponding to Azure OpenAI is azure. Its specific configuration fields are as follows:

    - - +

    For Azure OpenAI, the corresponding type is azure. Its unique configuration field is:

    @@ -357,14 +359,10 @@

    Azure OpenAI

    - - - - - -
    NameData TypeRequirementDefault ValueDescription
    azureServiceUrlstringRequired-URL of Azure OpenAI service, must include api-version query parameter.
    Note: Azure OpenAI only supports the configuration of one API Token.
    +
    NameData TypeFilling RequirementsDefault ValueDescription
    azureServiceUrlstringRequired-The URL of the Azure OpenAI service, must include the api-version query parameter.
    +

    Note: Azure OpenAI only supports configuring one API Token.

    Moonshot

    -

    The type corresponding to Moonshot is moonshot. Its specific configuration fields are as follows:

    +

    For Moonshot, the corresponding type is moonshot. Its unique configuration field is:

    @@ -384,9 +382,9 @@

    Moonshot

    -
    NameData TypeRequirementDefault ValueDescription
    moonshotFileIdstringOptional-File ID uploaded to Moonshot via the file interface, its content will be used as the context for AI conversation. Cannot be configured simultaneously with the context field.
    -

    Qwen

    -

    The type corresponding to Qwen is qwen. Its specific configuration fields are as follows:

    +
    NameData TypeFilling RequirementsDefault ValueDescription
    moonshotFileIdstringOptional-The file ID uploaded via the file interface to Moonshot, whose content will be used as context for AI conversations. Cannot be configured with the context field.
    +

    Qwen (Tongyi Qwen)

    +

    For Qwen (Tongyi Qwen), the corresponding type is qwen. Its unique configuration fields are:

    @@ -413,25 +411,25 @@

    Qwen

    -
    NameData TypeRequirementDefault ValueDescription
    qwenEnableSearchbooleanOptional-Whether to enable the built-in internet search functionality of Qwen.
    qwenFileIdsarray of stringOptional-File IDs uploaded to Dashscope via the file interface, its contents will be used as the context for AI conversation. Cannot be configured simultaneously with the context field.
    +
    NameData TypeFilling RequirementsDefault ValueDescription
    qwenEnableSearchbooleanOptional-Whether to enable the built-in Internet search function provided by Qwen.
    qwenFileIdsarray of stringOptional-The file IDs uploaded via the Dashscope file interface, whose content will be used as context for AI conversations. Cannot be configured with the context field.

    Baichuan AI

    -

    The type corresponding to Baichuan AI is baichuan. It has no specific configuration fields.

    -

    Yi

    -

    The type corresponding to Yi is yi. It has no specific configuration fields.

    +

    For Baichuan AI, the corresponding type is baichuan. It has no unique configuration fields.

    +

    Yi (Zero One Universe)

    +

    For Yi (Zero One Universe), the corresponding type is yi. It has no unique configuration fields.

    Zhipu AI

    -

    The type corresponding to Zhipu AI is zhipuai. It has no specific configuration fields.

    +

    For Zhipu AI, the corresponding type is zhipuai. It has no unique configuration fields.

    DeepSeek

    -

    The type corresponding to DeepSeek is deepseek. It has no specific configuration fields.

    +

    For DeepSeek, the corresponding type is deepseek. It has no unique configuration fields.

    Groq

    -

    The type corresponding to Groq is groq. It has no specific configuration fields.

    -

    Baidu

    -

    The type corresponding to Baidu is baidu. It has no specific configuration fields.

    -

    AI360

    -

    The type corresponding to AI360 is ai360. It has no specific configuration fields.

    -

    Mistral

    -

    The type corresponding to Mistral is mistral. It has no specific configuration fields.

    +

    For Groq, the corresponding type is groq. It has no unique configuration fields.

    +

    ERNIE Bot

    +

    For ERNIE Bot, the corresponding type is baidu. It has no unique configuration fields.

    +

    360 Brain

    +

    For 360 Brain, the corresponding type is ai360. It has no unique configuration fields.

    +

    Mistral

    +

    For Mistral, the corresponding type is mistral. It has no unique configuration fields.

    MiniMax

    -

    The type corresponding to MiniMax is minimax. Its specific configuration fields are as follows:

    +

    For MiniMax, the corresponding type is minimax. Its unique configuration field is:

    @@ -451,9 +449,9 @@

    MiniMax

    -
    NameData TypeRequirementDefault ValueDescription
    minimaxGroupIdstringRequired when using abab6.5-chat, abab6.5s-chat, abab5.5s-chat, or abab5.5-chat models-When using these models, ChatCompletion Pro will be used, and groupID needs to be set.
    +
    NameData TypeFilling RequirementsDefault ValueDescription
    minimaxGroupIdstringRequired when using models abab6.5-chat, abab6.5s-chat, abab5.5s-chat, abab5.5-chat-When using models abab6.5-chat, abab6.5s-chat, abab5.5s-chat, abab5.5-chat, Minimax uses ChatCompletion Pro and requires setting the groupID.

    Anthropic Claude

    -

    The type corresponding to Anthropic Claude is claude. Its specific configuration fields are as follows:

    +

    For Anthropic Claude, the corresponding type is claude. Its unique configuration field is:

    @@ -473,9 +471,9 @@

    Anthropic Claude

    -
    NameData TypeRequirementDefault ValueDescription
    claudeVersionstringOptional-The API version for Claude service, defaults to 2023-06-01
    +
    NameData TypeFilling RequirementsDefault ValueDescription
    claudeVersionstringOptional-The version of the Claude service’s API, default is 2023-06-01.

    Ollama

    -

    The type corresponding to Ollama is ollama. Its specific configuration fields are as follows:

    +

    For Ollama, the corresponding type is ollama. Its unique configuration field is:

    @@ -502,9 +500,9 @@

    Ollama

    -
    NameData TypeRequirementDefault ValueDescription
    ollamaServerHoststringRequired-Host address for the Ollama server
    ollamaServerPortnumberRequired-Port number for the Ollama server, defaults to 11434
    +
    NameData TypeFilling RequirementsDefault ValueDescription
    ollamaServerHoststringRequired-The host address of the Ollama server.
    ollamaServerPortnumberRequired-The port number of the Ollama server, defaults to 11434.

    Hunyuan

    -

    The type corresponding to Hunyuan is hunyuan. Its specific configuration fields are as follows:

    +

    For Hunyuan, the corresponding type is hunyuan. Its unique configuration fields are:

    @@ -531,11 +529,11 @@

    Hunyuan

    -
    NameData TypeRequirementDefault ValueDescription
    hunyuanAuthIdstringRequired-ID used for Hunyuan authentication with version v3
    hunyuanAuthKeystringRequired-Key used for Hunyuan authentication with version v3
    +
    NameData TypeFilling RequirementsDefault ValueDescription
    hunyuanAuthIdstringRequired-Hunyuan authentication ID for version 3 authentication.
    hunyuanAuthKeystringRequired-Hunyuan authentication key for version 3 authentication.

    Stepfun

    -

    The type corresponding to Stepfun is stepfun. It has no specific configuration fields.

    +

    For Stepfun, the corresponding type is stepfun. It has no unique configuration fields.

    Cloudflare Workers AI

    -

    The type corresponding to Cloudflare Workers AI is cloudflare. Its specific configuration fields are as follows:

    +

    For Cloudflare Workers AI, the corresponding type is cloudflare. Its unique configuration field is:

    @@ -555,12 +553,12 @@

    Cloudflare Workers AI

    -
    NameData TypeRequirementDefault ValueDescription
    cloudflareAccountIdstringRequired-Cloudflare Account ID
    +
    NameData TypeFilling RequirementsDefault ValueDescription
    cloudflareAccountIdstringRequired-Cloudflare Account ID.

    Spark

    -

    The type corresponding to Spark is spark. It has no specific configuration fields.

    -

    The apiTokens field value for iFlytek’s Spark cognitive large model is APIKey:APISecret. That is, fill in your own APIKey and APISecret, separated by :.

    +

    For Spark, the corresponding type is spark. It has no unique configuration fields.

    +

    The apiTokens field value for Xunfei Spark (Xunfei Star) is APIKey:APISecret. That is, enter your own APIKey and APISecret, separated by :.

    Gemini

    -

    The type corresponding to Gemini is gemini. Its specific configuration fields are as follows:

    +

    For Gemini, the corresponding type is gemini. Its unique configuration field is:

    @@ -580,9 +578,9 @@

    Gemini

    -
    NameData TypeRequirementDefault ValueDescription
    geminiSafetySettingmap of stringOptional-Gemini AI content filtering and safety level settings. Refer to Safety settings.
    -

    DeepL

    -

    The type corresponding to DeepL is deepl. Its specific configuration fields are as follows:

    +
    NameData TypeFilling RequirementsDefault ValueDescription
    geminiSafetySettingmap of stringOptional-Gemini AI content filtering and safety level settings. Refer to Safety settings.
    +

    DeepL

    +

    For DeepL, the corresponding type is deepl. Its unique configuration field is:

    @@ -602,60 +600,168 @@

    DeepL

    -
    NameData TypeRequirementDefault ValueDescription
    targetLangstringRequired-Target language required by DeepL translation service.
    -

    Cohere

    -

    The type corresponding to Cohere is cohere. It has no specific configuration fields.

    +
    NameData TypeRequirementDefaultDescription
    targetLangstringRequired-The target language required by the DeepL translation service

    Usage Examples

    -

    Using OpenAI Protocol to Proxy Azure OpenAI Service

    -

    Using the most basic Azure OpenAI service with no context configured.

    +

    Using OpenAI Protocol Proxy for Azure OpenAI Service

    +

    Using the basic Azure OpenAI service without configuring any context.

    Configuration Information

    -
    provider:
    type: azure
    apiTokens:
    - "YOUR_AZURE_OPENAI_API_TOKEN"
    azureServiceUrl: "https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2024-02-15-preview"
    -

    Using OpenAI Protocol to Proxy Qwen Service

    -

    Using Qwen service with a model mapping from OpenAI large models to Qwen.

    +
    provider:
    type: azure
    apiTokens:
    - "YOUR_AZURE_OPENAI_API_TOKEN"
    azureServiceUrl: "https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2024-02-15-preview",
    +

    Request Example

    +
    {
    "model": "gpt-3",
    "messages": [
    {
    "role": "user",
    "content": "Hello, who are you?"
    }
    ],
    "temperature": 0.3
    }
    +

    Response Example

    +
    {
    "choices": [
    {
    "content_filter_results": {
    "hate": {
    "filtered": false,
    "severity": "safe"
    },
    "self_harm": {
    "filtered": false,
    "severity": "safe"
    },
    "sexual": {
    "filtered": false,
    "severity": "safe"
    },
    "violence": {
    "filtered": false,
    "severity": "safe"
    }
    },
    "finish_reason": "stop",
    "index": 0,
    "logprobs": null,
    "message": {
    "content": "Hello! I am an AI assistant, here to answer your questions and provide assistance. Is there anything I can help you with?",
    "role": "assistant"
    }
    }
    ],
    "created": 1714807624,
    "id": "chatcmpl-abcdefg1234567890",
    "model": "gpt-35-turbo-16k",
    "object": "chat.completion",
    "prompt_filter_results": [
    {
    "prompt_index": 0,
    "content_filter_results": {
    "hate": {
    "filtered": false,
    "severity": "safe"
    },
    "self_harm": {
    "filtered": false,
    "severity": "safe"
    },
    "sexual": {
    "filtered": false,
    "severity": "safe"
    },
    "violence": {
    "filtered": false,
    "severity": "safe"
    }
    }
    }
    ],
    "system_fingerprint": null,
    "usage": {
    "completion_tokens": 40,
    "prompt_tokens": 15,
    "total_tokens": 55
    }
    }
    +

    Using OpenAI Protocol Proxy for Qwen Service

    +

    Using Qwen service and configuring the mapping relationship between OpenAI large models and Qwen models.

    Configuration Information

    provider:
    type: qwen
    apiTokens:
    - "YOUR_QWEN_API_TOKEN"
    modelMapping:
    'gpt-3': "qwen-turbo"
    'gpt-35-turbo': "qwen-plus"
    'gpt-4-turbo': "qwen-max"
    'gpt-4-*': "qwen-max"
    'gpt-4o': "qwen-vl-plus"
    'text-embedding-v1': 'text-embedding-v1'
    '*': "qwen-turbo"
    -

    Using original protocol to Proxy Baichuan AI proxy application

    +

    AI Conversation Request Example

    +

    URL: http://your-domain/v1/chat/completions

    +

    Request Example:

    +
    {
    "model": "gpt-3",
    "messages": [
    {
    "role": "user",
    "content": "Hello, who are you?"
    }
    ],
    "temperature": 0.3
    }
    +

    Response Example:

    +
    {
    "id": "c2518bd3-0f46-97d1-be34-bb5777cb3108",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "I am Qwen, an AI assistant developed by Alibaba Cloud. I can answer various questions, provide information, and engage in conversations with users. How can I assist you?"
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1715175072,
    "model": "qwen-turbo",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 24,
    "completion_tokens": 33,
    "total_tokens": 57
    }
    }
    +

    Multimodal Model API Request Example (Applicable to qwen-vl-plus and qwen-vl-max Models)

    +

    URL: http://your-domain/v1/chat/completions

    +

    Request Example:

    +
    {
    "model": "gpt-4o",
    "messages": [
    {
    "role": "user",
    "content": [
    {
    "type": "image_url",
    "image_url": {
    "url": "https://dashscope.oss-cn-beijing.aliyuncs.com/images/dog_and_girl.jpeg"
    }
    },
    {
    "type": "text",
    "text": "Where is this picture from?"
    }
    ]
    }
    ],
    "temperature": 0.3
    }
    +

    Response Example:

    +
    {
    "id": "17c5955d-af9c-9f28-bbde-293a9c9a3515",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": [
    {
    "text": "This photo depicts a woman and a dog on a beach. As I cannot access specific geographical information, I cannot pinpoint the exact location of this beach. However, visually, it appears to be a sandy coastline along a coastal area with waves breaking on the shore. Such scenes can be found in many beautiful seaside locations worldwide. If you need more precise information, please provide additional context or descriptive details."
    }
    ]
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1723949230,
    "model": "qwen-vl-plus",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 1279,
    "completion_tokens": 78
    }
    }
    +

    Text Embedding Request Example

    +

    URL: http://your-domain/v1/embeddings

    +

    Request Example:

    +
    {
    "model": "text-embedding-v1",
    "input": "Hello"
    }
    +

    Response Example:

    +
    {
    "object": "list",
    "data": [
    {
    "object": "embedding",
    "index": 0,
    "embedding": [
    -1.0437825918197632,
    5.208984375,
    3.0483806133270264,
    -1.7897135019302368,
    -2.0107421875,
    ...,
    0.8125,
    -1.1759847402572632,
    0.8174641728401184,
    1.0432943105697632,
    -0.5885213017463684
    ]
    }
    ],
    "model": "text-embedding-v1",
    "usage": {
    "prompt_tokens": 1,
    "total_tokens": 1
    }
    }
    +

    Using Qwen Service with Pure Text Context Information

    +

    Using Qwen service while configuring pure text context information.

    Configuration Information

    -
    provider:
    type: qwen
    apiTokens:
    - "YOUR_DASHSCOPE_API_TOKEN"
    protocol: original
    -

    Using OpenAI Protocol to Proxy Doubao Large Model Service

    +
    provider:
    type: qwen
    apiTokens:
    - "YOUR_QWEN_API_TOKEN"
    modelMapping:
    "*": "qwen-turbo"
    context:
    - fileUrl: "http://file.default.svc.cluster.local/ai/context.txt",
    serviceName: "file.dns",
    servicePort: 80
    +

    Request Example

    +
    {
    "model": "gpt-3",
    "messages": [
    {
    "role": "user",
    "content": "Please summarize the content"
    }
    ],
    "temperature": 0.3
    }
    +

    Response Example

    +
    {
    "id": "cmpl-77861a17681f4987ab8270dbf8001936",
    "object": "chat.completion",
    "created": 9756990,
    "model": "moonshot-v1-128k",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "The content of this document is about..."
    },
    "finish_reason": "stop"
    }
    ],
    "usage": {
    "prompt_tokens": 20181,
    "completion_tokens": 439,
    "total_tokens": 20620
    }
    }
    +

    Using Qwen Service with Native File Context

    +

    Uploading files to Qwen in advance to use them as context when utilizing its AI service.

    +

    Configuration Information

    +
    provider:
    type: qwen
    apiTokens:
    - "YOUR_QWEN_API_TOKEN"
    modelMapping:
    "*": "qwen-long" # Qwen's file context can only be used in the qwen-long model
    qwenFileIds:
    - "file-fe-xxx"
    - "file-fe-yyy"
    +

    Request Example

    +
    {
    "model": "gpt-4-turbo",
    "messages": [
    {
    "role": "user",
    "content": "Please summarize the content"
    }
    ],
    "temperature": 0.3
    }
    +

    Response Example

    +
    {
    "output": {
    "choices": [
    {
    "finish_reason": "stop",
    "message": {
    "role": "assistant",
    "content": "You uploaded two files, `context.txt` and `context_2.txt`, which seem to contain information about..."
    }
    }
    ]
    },
    "usage": {
    "total_tokens": 2023,
    "output_tokens": 530,
    "input_tokens": 1493
    },
    "request_id": "187e99ba-5b64-9ffe-8f69-01dafbaf6ed7"
    }
    +

    Forwards requests to AliCloud Bailian with the “original” protocol

    Configuration Information

    -
    provider:
    type: doubao
    apiTokens:
    - "YOUR_DOUBAO_API_KEY"
    modelMapping:
    '*': YOUR_DOUBAO_ENDPOINT
    timeout: 1200000
    -

    Using Moonshot with its native file context

    -

    Pre-upload a file to Moonshot to use its content as context for its AI service.

    +
    activeProviderId: my-qwen
    providers:
    - id: my-qwen
    type: qwen
    apiTokens:
    - "YOUR_DASHSCOPE_API_TOKEN"
    protocol: original
    +

    Example Request

    +
    {
    "input": {
    "prompt": "What is Dubbo?"
    },
    "parameters": {},
    "debug": {}
    }
    +

    Example Response

    +
    {
    "output": {
    "finish_reason": "stop",
    "session_id": "677e7e8fbb874e1b84792b65042e1599",
    "text": "Apache Dubbo is a..."
    },
    "usage": {
    "models": [
    {
    "output_tokens": 449,
    "model_id": "qwen-max",
    "input_tokens": 282
    }
    ]
    },
    "request_id": "b59e45e3-5af4-91df-b7c6-9d746fd3297c"
    }
    +

    Using OpenAI Protocol Proxy for Doubao Service

    +
    activeProviderId: my-doubao
    providers:
    - id: my-doubao
    type: doubao
    apiTokens:
    - YOUR_DOUBAO_API_KEY
    modelMapping:
    '*': YOUR_DOUBAO_ENDPOINT
    timeout: 1200000
    +

    Using original Protocol Proxy for Coze applications

    +
    provider:
    type: coze
    apiTokens:
    - YOUR_COZE_API_KEY
    protocol: original
    +

    Utilizing Moonshot with its Native File Context

    +

    Upload files to Moonshot in advance and use its AI services based on file content.

    Configuration Information

    -
    provider:
    type: moonshot
    apiTokens:
    - "YOUR_MOONSHOT_API_TOKEN"
    moonshotFileId: "YOUR_MOONSHOT_FILE_ID"
    modelMapping:
    '*': "moonshot-v1-32k"
    -

    Using OpenAI Protocol to Proxy Groq Service

    +
    provider:
    type: moonshot
    apiTokens:
    - "YOUR_MOONSHOT_API_TOKEN"
    moonshotFileId: "YOUR_MOONSHOT_FILE_ID",
    modelMapping:
    '*': "moonshot-v1-32k"
    +

    Example Request

    +
    {
    "model": "gpt-4-turbo",
    "messages": [
    {
    "role": "user",
    "content": "Please summarize the content"
    }
    ],
    "temperature": 0.3
    }
    +

    Example Response

    +
    {
    "id": "cmpl-e5ca873642ca4f5d8b178c1742f9a8e8",
    "object": "chat.completion",
    "created": 1872961,
    "model": "moonshot-v1-128k",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "The content of the text is about a payment platform named ‘xxxx’..."
    },
    "finish_reason": "stop"
    }
    ],
    "usage": {
    "prompt_tokens": 11,
    "completion_tokens": 498,
    "total_tokens": 509
    }
    }
    +

    Using OpenAI Protocol Proxy for Groq Service

    Configuration Information

    provider:
    type: groq
    apiTokens:
    - "YOUR_GROQ_API_TOKEN"
    -

    Using OpenAI Protocol to Proxy Claude Service

    +

    Example Request

    +
    {
    "model": "llama3-8b-8192",
    "messages": [
    {
    "role": "user",
    "content": "Hello, who are you?"
    }
    ]
    }
    +

    Example Response

    +
    {
    "id": "chatcmpl-26733989-6c52-4056-b7a9-5da791bd7102",
    "object": "chat.completion",
    "created": 1715917967,
    "model": "llama3-8b-8192",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "😊 Ni Hao! (That's \"hello\" in Chinese!)\n\nI am LLaMA, an AI assistant developed by Meta AI that can understand and respond to human input in a conversational manner. I'm not a human, but a computer program designed to simulate conversations and answer questions to the best of my ability. I'm happy to chat with you in Chinese or help with any questions or topics you'd like to discuss! 😊"
    },
    "logprobs": null,
    "finish_reason": "stop"
    }
    ],
    "usage": {
    "prompt_tokens": 16,
    "prompt_time": 0.005,
    "completion_tokens": 89,
    "completion_time": 0.104,
    "total_tokens": 105,
    "total_time": 0.109
    },
    "system_fingerprint": "fp_dadc9d6142",
    "x_groq": {
    "id": "req_01hy2awmcxfpwbq56qh6svm7qz"
    }
    }
    +

    Using OpenAI Protocol Proxy for Claude Service

    Configuration Information

    provider:
    type: claude
    apiTokens:
    - "YOUR_CLAUDE_API_TOKEN"
    version: "2023-06-01"
    -

    Using OpenAI Protocol to Proxy Hunyuan Service

    +

    Example Request

    +
    {
    "model": "claude-3-opus-20240229",
    "max_tokens": 1024,
    "messages": [
    {
    "role": "user",
    "content": "Hello, who are you?"
    }
    ]
    }
    +

    Example Response

    +
    {
    "id": "msg_01Jt3GzyjuzymnxmZERJguLK",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "Hello, I am a conversation system developed by Anthropic, a company specializing in artificial intelligence. My name is Claude, a friendly and knowledgeable chatbot. Nice to meet you! I can engage in discussions on various topics, answer questions, provide suggestions, and assist you. I'll do my best to give you helpful responses. I hope we have a pleasant exchange!"
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1717385918,
    "model": "claude-3-opus-20240229",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 16,
    "completion_tokens": 126,
    "total_tokens": 142
    }
    }
    +

    Using OpenAI Protocol Proxy for Hunyuan Service

    Configuration Information

    provider:
    type: "hunyuan"
    hunyuanAuthKey: "<YOUR AUTH KEY>"
    apiTokens:
    - ""
    hunyuanAuthId: "<YOUR AUTH ID>"
    timeout: 1200000
    modelMapping:
    "*": "hunyuan-lite"
    -

    Using OpenAI Protocol to Proxy Baidu Wenxin Service

    +

    Example Request

    +

    Request script:

    +
    Terminal window
    curl --location 'http://<your higress domain>/v1/chat/completions' \
    --header 'Content-Type: application/json' \
    --data '{
    "model": "gpt-3",
    "messages": [
    {
    "role": "system",
    "content": "You are a professional developer!"
    },
    {
    "role": "user",
    "content": "Hello, who are you?"
    }
    ],
    "temperature": 0.3,
    "stream": false
    }'
    +

    Example Response

    +
    {
    "id": "fd140c3e-0b69-4b19-849b-d354d32a6162",
    "choices": [
    {
    "index": 0,
    "delta": {
    "role": "assistant",
    "content": "Hello! I am a professional developer."
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1717493117,
    "model": "hunyuan-lite",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 15,
    "completion_tokens": 9,
    "total_tokens": 24
    }
    }
    +

    Using OpenAI Protocol Proxy for ERNIE Bot Service

    Configuration Information

    provider:
    type: baidu
    apiTokens:
    - "YOUR_BAIDU_API_TOKEN"
    modelMapping:
    'gpt-3': "ERNIE-4.0"
    '*': "ERNIE-4.0"
    -

    Using OpenAI Protocol to Proxy MiniMax Service

    +

    Request Example

    +
    {
    "model": "gpt-4-turbo",
    "messages": [
    {
    "role": "user",
    "content": "Hello, who are you?"
    }
    ],
    "stream": false
    }
    +

    Response Example

    +
    {
    "id": "as-e90yfg1pk1",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "Hello, I am ERNIE Bot. I can interact with people, answer questions, assist in creation, and efficiently provide information, knowledge, and inspiration."
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1717251488,
    "model": "ERNIE-4.0",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 4,
    "completion_tokens": 33,
    "total_tokens": 37
    }
    }
    +

    Using OpenAI Protocol Proxy for MiniMax Service

    Configuration Information

    provider:
    type: minimax
    apiTokens:
    - "YOUR_MINIMAX_API_TOKEN"
    modelMapping:
    "gpt-3": "abab6.5g-chat"
    "gpt-4": "abab6.5-chat"
    "*": "abab6.5g-chat"
    minimaxGroupId: "YOUR_MINIMAX_GROUP_ID"
    -

    Using OpenAI Protocol to Proxy AI360 Service

    +

    Request Example

    +
    {
    "model": "gpt-4-turbo",
    "messages": [
    {
    "role": "user",
    "content": "Hello, who are you?"
    }
    ],
    "stream": false
    }
    +

    Response Example

    +
    {
    "id": "02b2251f8c6c09d68c1743f07c72afd7",
    "choices": [
    {
    "finish_reason": "stop",
    "index": 0,
    "message": {
    "content": "Hello! I am MM Intelligent Assistant, a large language model developed by MiniMax. I can help answer questions, provide information, and engage in conversations. How can I assist you?",
    "role": "assistant"
    }
    }
    ],
    "created": 1717760544,
    "model": "abab6.5s-chat",
    "object": "chat.completion",
    "usage": {
    "total_tokens": 106
    },
    "input_sensitive": false,
    "output_sensitive": false,
    "input_sensitive_type": 0,
    "output_sensitive_type": 0,
    "base_resp": {
    "status_code": 0,
    "status_msg": ""
    }
    }
    +

    Using OpenAI Protocol Proxy for 360 Brain Services

    Configuration Information

    -
    provider:
    type: ai360
    apiTokens:
    - "YOUR_MINIMAX_API_TOKEN"
    modelMapping:
    "gpt-4o": "360gpt-turbo-responsibility-8k"
    "gpt-4": "360gpt2-pro"
    "gpt-3.5": "360gpt-turbo"
    "text-embedding-3-small": "embedding_s1_v1.2"
    "*": "360gpt-pro"
    -

    Using OpenAI Protocol to Proxy Cloudflare Workers AI Service

    +
    provider:
    type: ai360
    apiTokens:
    - "YOUR_AI360_API_TOKEN"
    modelMapping:
    "gpt-4o": "360gpt-turbo-responsibility-8k"
    "gpt-4": "360gpt2-pro"
    "gpt-3.5": "360gpt-turbo"
    "text-embedding-3-small": "embedding_s1_v1.2"
    "*": "360gpt-pro"
    +

    Request Example

    +
    {
    "model": "gpt-4o",
    "messages": [
    {
    "role": "system",
    "content": "You are a professional developer!"
    },
    {
    "role": "user",
    "content": "Hello, who are you?"
    }
    ]
    }
    +

    Response Example

    +
    {
    "choices": [
    {
    "message": {
    "role": "assistant",
    "content": "Hello, I am 360 Brain, a large language model. I can assist with answering various questions, providing information, engaging in conversations, and more. How can I assist you?"
    },
    "finish_reason": "",
    "index": 0
    }
    ],
    "created": 1724257207,
    "id": "5e5c94a2-d989-40b5-9965-5b971db941fe",
    "model": "360gpt-turbo",
    "object": "",
    "usage": {
    "completion_tokens": 33,
    "prompt_tokens": 24,
    "total_tokens": 57
    },
    "messages": [
    {
    "role": "system",
    "content": "You are a professional developer!"
    },
    {
    "role": "user",
    "content": "Hello, who are you?"
    }
    ],
    "context": null
    }
    +

    Text Embedding Request Example

    +

    URL: http://your-domain/v1/embeddings

    +

    Request Example

    +
    {
    "input":["Hello"],
    "model":"text-embedding-3-small"
    }
    +

    Response Example

    +
    {
    "data": [
    {
    "embedding": [
    -0.011237,
    -0.015433,
    ...,
    -0.028946,
    -0.052778,
    0.003768,
    -0.007917,
    -0.042201
    ],
    "index": 0,
    "object": ""
    }
    ],
    "model": "embedding_s1_v1.2",
    "object": "",
    "usage": {
    "prompt_tokens": 2,
    "total_tokens": 2
    }
    }
    +

    Using OpenAI Protocol Proxy for Cloudflare Workers AI Service

    Configuration Information

    provider:
    type: cloudflare
    apiTokens:
    - "YOUR_WORKERS_AI_API_TOKEN"
    cloudflareAccountId: "YOUR_CLOUDFLARE_ACCOUNT_ID"
    modelMapping:
    "*": "@cf/meta/llama-3-8b-instruct"
    -

    Using OpenAI Protocol to Proxy Spark Service

    +

    Request Example

    +
    {
    "model": "gpt-3.5",
    "max_tokens": 1024,
    "messages": [
    {
    "role": "user",
    "content": "Who are you?"
    }
    ]
    }
    +

    Response Example

    +
    {
    "id": "id-1720367803430",
    "object": "chat.completion",
    "created": 1720367803,
    "model": "@cf/meta/llama-3-8b-instruct",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "I am LLaMA, an AI assistant developed by Meta AI that can understand and respond to human input in a conversational manner. I'm not a human, but a computer program designed to simulate conversation and answer questions to the best of my knowledge. I can be used to generate text on a wide range of topics, from science and history to entertainment and culture."
    },
    "logprobs": null,
    "finish_reason": "stop"
    }
    ]
    }
    +

    Using OpenAI Protocol Proxy for Spark Service

    Configuration Information

    provider:
    type: spark
    apiTokens:
    - "APIKey:APISecret"
    modelMapping:
    "gpt-4o": "generalv3.5"
    "gpt-4": "generalv3"
    "*": "general"
    -

    Using OpenAI Protocol to Proxy Gemini Service

    +

    Request Example

    +
    {
    "model": "gpt-4o",
    "messages": [
    {
    "role": "system",
    "content": "You are a professional developer!"
    },
    {
    "role": "user",
    "content": "Hello, who are you?"
    }
    ],
    "stream": false
    }
    +

    Response Example

    +
    {
    "id": "cha000c23c6@dx190ef0b4b96b8f2532",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "Hello! I am a professional developer skilled in programming and problem-solving. What can I assist you with?"
    }
    }
    ],
    "created": 1721997415,
    "model": "generalv3.5",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 10,
    "completion_tokens": 19,
    "total_tokens": 29
    }
    }
    +

    Utilizing OpenAI Protocol Proxy for Gemini Services

    Configuration Information

    -
    provider:
    type: gemini
    apiTokens:
    - "YOUR_GEMINI_API_TOKEN"
    modelMapping:
    "*": "gemini-pro"
    geminiSafetySetting:
    "HARM_CATEGORY_SEXUALLY_EXPLICIT": "BLOCK_NONE"
    "HARM_CATEGORY_HATE_SPEECH": "BLOCK_NONE"
    "HARM_CATEGORY_HARASSMENT": "BLOCK_NONE"
    "HARM_CATEGORY_DANGEROUS_CONTENT": "BLOCK_NONE"
    -

    Using OpenAI Protocol to Proxy DeepL Text Translation Service

    +
    provider:
    type: gemini
    apiTokens:
    - "YOUR_GEMINI_API_TOKEN"
    modelMapping:
    "*": "gemini-pro"
    geminiSafetySetting:
    "HARM_CATEGORY_SEXUALLY_EXPLICIT" :"BLOCK_NONE"
    "HARM_CATEGORY_HATE_SPEECH" :"BLOCK_NONE"
    "HARM_CATEGORY_HARASSMENT" :"BLOCK_NONE"
    "HARM_CATEGORY_DANGEROUS_CONTENT" :"BLOCK_NONE"
    +

    Request Example

    +
    {
    "model": "gpt-3.5",
    "messages": [
    {
    "role": "user",
    "content": "Who are you?"
    }
    ],
    "stream": false
    }
    +

    Response Example

    +
    {
    "id": "chatcmpl-b010867c-0d3f-40ba-95fd-4e8030551aeb",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "I am a large multi-modal model, trained by Google. I am designed to provide information and answer questions to the best of my abilities."
    },
    "finish_reason": "stop"
    }
    ],
    "created": 1722756984,
    "model": "gemini-pro",
    "object": "chat.completion",
    "usage": {
    "prompt_tokens": 5,
    "completion_tokens": 29,
    "total_tokens": 34
    }
    }
    +

    Utilizing OpenAI Protocol Proxy for DeepL Text Translation Service

    Configuration Information

    provider:
    type: deepl
    apiTokens:
    - "YOUR_DEEPL_API_TOKEN"
    targetLang: "ZH"

    Request Example -In this context, model indicates the type of DeepL service, which can only be Free or Pro. The content sets the text to be translated; in the role: system content, context that may affect the translation but itself will not be translated can be included. For example, when translating product names, product descriptions can be passed as context, and this additional context may improve the quality of the translation.

    +Here, model denotes the service tier of DeepL and can only be either Free or Pro. The content field contains the text to be translated; within role: system, content may include context that influences the translation but isn’t translated itself. For instance, when translating product names, including a product description as context could enhance translation quality.

    {
    "model": "Free",
    "messages": [
    {
    "role": "system",
    "content": "money"
    },
    {
    "content": "sit by the bank"
    },
    {
    "content": "a bank in China"
    }
    ]
    }

    Response Example

    -
    {
    "choices": [
    {
    "index": 0,
    "message": { "name": "EN", "role": "assistant", "content": "坐庄" }
    },
    {
    "index": 1,
    "message": { "name": "EN", "role": "assistant", "content": "中国银行" }
    }
    ],
    "created": 1722747752,
    "model": "Free",
    "object": "chat.completion",
    "usage": {}
    }
    \ No newline at end of file +
    {
    "choices": [
    {
    "index": 0,
    "message": { "name": "EN", "role": "assistant", "content": "operate a gambling establishment" }
    },
    {
    "index": 1,
    "message": { "name": "EN", "role": "assistant", "content": "Bank of China" }
    }
    ],
    "created": 1722747752,
    "model": "Free",
    "object": "chat.completion",
    "usage": {}
    }
    +

    Utilizing OpenAI Protocol Proxy for Together-AI Services

    +

    Configuration Information

    +
    provider:
    type: together-ai
    apiTokens:
    - "YOUR_TOGETHER_AI_API_TOKEN"
    modelMapping:
    "*": "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"
    +

    Request Example

    +
    {
    "model": "Qwen/Qwen2.5-72B-Instruct-Turbo",
    "messages": [
    {
    "role": "user",
    "content": "Who are you?"
    }
    ]
    }
    +

    Response Example

    +
    {
    "id": "8f5809d54b73efac",
    "object": "chat.completion",
    "created": 1734785851,
    "model": "Qwen/Qwen2.5-72B-Instruct-Turbo",
    "prompt": [],
    "choices": [
    {
    "finish_reason": "eos",
    "seed": 12830868308626506000,
    "logprobs": null,
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "I am Qwen, a large language model created by Alibaba Cloud. I am designed to assist users in generating various types of text, such as articles, stories, poems, and more, as well as answering questions and providing information on a wide range of topics. How can I assist you today?",
    "tool_calls": []
    }
    }
    ],
    "usage": {
    "prompt_tokens": 33,
    "completion_tokens": 61,
    "total_tokens": 94
    }
    }
    +

    Full Configuration Example

    +

    Kubernetes Example

    +

    Here’s a full plugin configuration example using the OpenAI protocol proxy for Groq services.

    +
    apiVersion: extensions.higress.io/v1alpha1
    kind: WasmPlugin
    metadata:
    name: ai-proxy-groq
    namespace: higress-system
    spec:
    matchRules:
    - config:
    provider:
    type: groq
    apiTokens:
    - "YOUR_API_TOKEN"
    ingress:
    - groq
    url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ai-proxy:1.0.0
    ---
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
    annotations:
    higress.io/backend-protocol: HTTPS
    higress.io/destination: groq.dns
    higress.io/proxy-ssl-name: api.groq.com
    higress.io/proxy-ssl-server-name: "on"
    labels:
    higress.io/resource-definer: higress
    name: groq
    namespace: higress-system
    spec:
    ingressClassName: higress
    rules:
    - host: <YOUR-DOMAIN>
    http:
    paths:
    - backend:
    resource:
    apiGroup: networking.higress.io
    kind: McpBridge
    name: default
    path: /
    pathType: Prefix
    ---
    apiVersion: networking.higress.io/v1
    kind: McpBridge
    metadata:
    name: default
    namespace: higress-system
    spec:
    registries:
    - domain: api.groq.com
    name: groq
    port: 443
    type: dns
    +

    Access Example:

    +
    Terminal window
    curl "http://<YOUR-DOMAIN>/v1/chat/completions" -H "Content-Type: application/json" -d '{
    "model": "llama3-8b-8192",
    "messages": [
    {
    "role": "user",
    "content": "hello, who are you?"
    }
    ]
    }'
    +

    Docker-Compose Example

    +

    docker-compose.yml configuration file:

    +
    version: '3.7'
    services:
    envoy:
    image: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/envoy:1.20
    entrypoint: /usr/local/bin/envoy
    # Enables debug level logging for easier debugging
    command: -c /etc/envoy/envoy.yaml --component-log-level wasm:debug
    networks:
    - higress-net
    ports:
    - "10000:10000"
    volumes:
    - ./envoy.yaml:/etc/envoy/envoy.yaml
    - ./plugin.wasm:/etc/envoy/plugin.wasm
    networks:
    higress-net: {}
    +

    envoy.yaml configuration file:

    +
    admin:
    address:
    socket_address:
    protocol: TCP
    address: 0.0.0.0
    port_value: 9901
    static_resources:
    listeners:
    - name: listener_0
    address:
    socket_address:
    protocol: TCP
    address: 0.0.0.0
    port_value: 10000
    filter_chains:
    - filters:
    - name: envoy.filters.network.http_connection_manager
    typed_config:
    "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
    scheme_header_transformation:
    scheme_to_overwrite: https
    stat_prefix: ingress_http
    # Outputs envoy logs to stdout
    access_log:
    - name: envoy.access_loggers.stdout
    typed_config:
    "@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
    # Modify as needed
    route_config:
    name: local_route
    virtual_hosts:
    - name: local_service
    domains: [ "*" ]
    routes:
    - match:
    prefix: "/"
    route:
    cluster: claude
    timeout: 300s
    http_filters:
    - name: claude
    typed_config:
    "@type": type.googleapis.com/udpa.type.v1.TypedStruct
    type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
    value:
    config:
    name: claude
    vm_config:
    runtime: envoy.wasm.runtime.v8
    code:
    local:
    filename: /etc/envoy/plugin.wasm
    configuration:
    "@type": "type.googleapis.com/google.protobuf.StringValue"
    value: | # Plugin configuration
    {
    "provider": {
    "type": "claude",
    "apiTokens": [
    "YOUR_API_TOKEN"
    ]
    }
    }
    - name: envoy.filters.http.router
    clusters:
    - name: claude
    connect_timeout: 30s
    type: LOGICAL_DNS
    dns_lookup_family: V4_ONLY
    lb_policy: ROUND_ROBIN
    load_assignment:
    cluster_name: claude
    endpoints:
    - lb_endpoints:
    - endpoint:
    address:
    socket_address:
    address: api.anthropic.com # Service address
    port_value: 443
    transport_socket:
    name: envoy.transport_sockets.tls
    typed_config:
    "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
    "sni": "api.anthropic.com"
    +

    Access Example:

    +
    Terminal window
    curl "http://localhost:10000/v1/chat/completions" -H "Content-Type: application/json" -d '{
    "model": "claude-3-opus-20240229",
    "max_tokens": 1024,
    "messages": [
    {
    "role": "user",
    "content": "hello, who are you?"
    }
    ]
    }'
    \ No newline at end of file diff --git a/en/docs/latest/plugins/ai/api-provider/ai-security-guard/index.html b/en/docs/latest/plugins/ai/api-provider/ai-security-guard/index.html index 0f97cc68a7..0464a6cb3e 100644 --- a/en/docs/latest/plugins/ai/api-provider/ai-security-guard/index.html +++ b/en/docs/latest/plugins/ai/api-provider/ai-security-guard/index.html @@ -33,7 +33,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - + Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN Skip to content
    铭师堂的云原生升级实践Know more
    PLUGIN
    PLUGIN

    Panoramic overview

    Overview Image
    overview image

    Panoramic overview

    Overview Image
    overview image
    +
    铭师堂的云原生升级实践Know more
    Welcome to Higress Plugin Hub -
    Powerful Wasm plugin system, supporting multiple languages, with independent version upgrades, zero-downtime updates, and sandbox isolation for memory safety. Build more flexible and secure application networks!

    友情链接: diff --git a/faq/higress-user-question-history16381/index.html b/faq/higress-user-question-history16381/index.html index 8d9b48bea7..3cb7e244c3 100644 --- a/faq/higress-user-question-history16381/index.html +++ b/faq/higress-user-question-history16381/index.html @@ -11,7 +11,7 @@ .link-text:where(.astro-zb5a5pg4) .link-icon:where(.astro-zb5a5pg4){width:0;opacity:0;transition:transform .5s ease,width .3s ease,opacity .3s ease}.link-text:where(.astro-zb5a5pg4):hover .link-icon:where(.astro-zb5a5pg4){transform:translate(3px);opacity:1;width:8px} - +

    铭师堂的云原生升级实践点此了解
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件
    插件

    全景概览

    微服务全景图
    overview image

    全景概览

    微服务全景图
    overview image
    +
    铭师堂的云原生升级实践点此了解