Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help request: Based on the JAVA language, how do plug-ins make high availability #10995

Closed
trayliang opened this issue Mar 5, 2024 · 8 comments

Comments

@trayliang
Copy link

Description

If the plug-in is written in JAVA, then when there is a problem with the JAVA program, when the JVM goes down, apisix will lose traffic. May I ask, is there a solution for this

Environment

  • APISIX version (run apisix version):
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):
@sunheyi6
Copy link
Contributor

sunheyi6 commented Mar 6, 2024

No, while it's not possible to completely avoid traffic loss, you can take measures to minimize downtime and restore the system quickly to reduce the impact on users. By implementing high availability, automated recovery, and fault tolerance mechanisms, you can ensure that the system can recover quickly when issues arise and minimize the duration of service interruptions. These approaches can help you effectively manage and mitigate the impact when Java applications fail, minimizing traffic loss as much as possible.

@trayliang
Copy link
Author

thanks, Will the plug-in extension plan for high availability in the future

@hanqingwu
Copy link
Contributor

maybe you can deploy multi apisix for a cluster , and put a LB in front of apisix cluster

@trayliang
Copy link
Author

At present, we have completed the production of business expansion based on Java plug-in.
Our current deployment is clb -> apisix -> java-plugin to business server
Where apisix and java-plugin are deployed to the same container because they communicate with unix domain sockets,
Then we rationally analyze, Java-plugin is a java process, if the process is down, apisix will pull up the Java process again, but in the process of pulling up
Traffic loss occurs.

@hanqingwu
Copy link
Contributor

hanqingwu commented Mar 8, 2024

OK, I get you point. So do you want apisix can retry mechanism when communicate timeout ?

@trayliang
Copy link
Author

Retry for the C end is prone to overall timeout, I think can be solved from the internal, support plug-in high availability it

@trayliang
Copy link
Author

Looking at the communication architecture between apisix and plug-ins, it is difficult to find a suitable theory to solve this problem

@trayliang
Copy link
Author

But can you solve this problem from the apisix side, when the service call plug-in times out, redirect to other nodes, complete the channel

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Apache APISIX backlog Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants