I have a Java project using the java.net
library to create a TCP server, and I wish to run it on AWS Elastic Beanstalk.
I understand that nginx can't host native TCP sockets (prior to v1.9, which EB doesn't support yet), and EB uses NGINX v1.8 (even though it says it uses v1.6.2 here ).
Is there any way to get my server running on Elastic Beanstalk? Should I look into switching from Java SE to Java EE?
Thanks,
Nathan
@Zoyt You can deploy TCP server on the AWS Elastic Beanstalk (EB). EB is primary focused on the typical web application. However, there is ways to configure EB as you need. What I would recommended:
As summary you have all the tools that allows to deploy your server on the EB.
if your application supports HTTP, then there's nothing to do, so I assume it doesn't. EB is tightly coupled with HTTP for traffic routing, monitoring and balancing - so you'll have to configure some stuff to let EB do its thing.
Now this should work, but unfortunately monitoring may still fail. If that's the case, write a small servlet that monitors your TCP server and add it to your deployment war. Configure the LB to check that URL and EB will create/destroy instances as your application load changes.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.