简体   繁体   中英

Apollo GraphQL server in AWS cloud with subscriptions

I would like to set up an apollo graphql server using AWS. I tried setting up apollo-server-lambda with AWS Lambda and it works perfectly fine, however it lacks pretty important feature: subscriptions, and for those you would need a websocket server.

I saw this solution for this problem https://github.com/ioxe/graphql-aws-iot-server which uses AWS IoT to handle subscriptions but it seems to be rather complex and non-maintained.

My question is it a right solution to get subscription or should I just set up an EC2 instance and run apollo sever there?

Also, If I do set up an EC2 instance for that, will it be easier to set up and how should it be scaled?

PS Before you ask, I am aware about AWS AppSync and this service is not suitable as it has a big problem with N+1 issues, long query execution times and broken android client.

我当前正在使用AWS Lambda,但是当我需要添加订阅时,我计划迁移到Elastic Beanstalk,而不是简单的EC2实例,因为它为您做了很多扩展,而且自阿波罗服务器2以来,它大约只有一行从Lambda切换到Beanstalk的代码集

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.

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