简体   繁体   English

如何互连Node.js应用程序服务器和LAMP堆栈?

[英]How can I interconnect a Node.js Application server and a LAMP stack?

My current web-application requires a LAMP stack and a Node.js WebSocket server to operate. 我当前的Web应用程序需要LAMP堆栈和Node.js WebSocket服务器才能运行。 Interaction between the MySQL database and the Node.js webserver is absolutely critical. MySQL数据库与Node.js Web服务器之间的交互绝对至关重要。

How may I have them communicate? 我该如何沟通? I am likely going to host the LAMP stack and the Node.js server on different AWS instances. 我可能将在不同的AWS实例上托管LAMP堆栈和Node.js服务器。

Insight is much appreciated, thanks! 非常感谢有识之士,谢谢!

Nodejs has many modules that can connect with a MySQL database. Nodejs有许多可以与MySQL数据库连接的模块。 node-mysql is one of the more popular ones. node-mysql是最受欢迎的节点之一。

Instead of using the default localhost you will need to specify the remote address of your LAMP stack. 而不是使用默认的localhost,您需要指定LAMP堆栈的远程地址。

As long as both your LAMP stack and the nodejs server are located in the same availability zone you should not have any major performance issues. 只要您的LAMP堆栈和nodejs服务器都位于同一可用区中,您就不会遇到任何主要的性能问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM