简体   繁体   English

带有订阅的AWS云中的Apollo GraphQL服务器

[英]Apollo GraphQL server in AWS cloud with subscriptions

I would like to set up an apollo graphql server using AWS. 我想使用AWS设置apollo graphql服务器。 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. 我尝试使用AWS Lambda设置apollo-server-lambda,并且效果很好,但是它缺少非常重要的功能:订阅,对于那些您需要Websocket服务器。

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. 我通过https://github.com/ioxe/graphql-aws-iot-server看到了用于解决此问题的解决方案,该服务器使用AWS IoT来处理订阅,但它似乎相当复杂且无法维护。

My question is it a right solution to get subscription or should I just set up an EC2 instance and run apollo sever there? 我的问题是获取订阅的正确解决方案,还是应该只设置一个EC2实例并在其中运行apollo服务器?

Also, If I do set up an EC2 instance for that, will it be easier to set up and how should it be scaled? 此外,如果我确实为此设置了EC2实例,那么设置起来会更容易吗,以及如何扩展它?

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. PS在您问之前,我知道AWS AppSync,并且此服务不适合使用,因为它存在N + 1问题,查询执行时间长以及android客户端损坏的大问题。

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

暂无
暂无

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

相关问题 无服务器框架+ AWS + Lambda + DynamoDB + GraphQL + Apollo服务器=无法使POST请求生效 - Serverless framework + AWS + Lambda + DynamoDB + GraphQL + Apollo Server = Can't make POST Request Work AWS Lambda 上的 Apollo graphql 服务无法读取 null 的属性“接受” - Apollo graphql service on AWS Lambda Cannot read property 'Accept' of null 将 AWS AppSync 用作 GraphQL 服务器 - Use AWS AppSync as a GraphQL Server 用于欧盟订阅的Autodesk Forge和AWS云服务服务器在哪里? - Where are Autodesk Forge and AWS cloud service servers located for EU subscriptions? AWS AppSync GraphQL 订阅(实时更新)的定价:按设备还是按订阅? - Pricing for AWS AppSync GraphQL Subscriptions (Real-Time Updates): Per device or per subscription? 将 graphQL 与 API 网关(apollo-server-lambda)与 AppSync 一起使用 - Use graphQL with API Gateway (apollo-server-lambda) vs. AppSync AWS Amplify GraphQL 订阅失败,并显示“无法为不可为空的类型返回 null:父 'Todo' (/onCreateChat/createdAt) 中的 'AWSDateTime'” - AWS Amplify GraphQL subscriptions fail with "Cannot return null for non-nullable type: 'AWSDateTime' within parent 'Todo' (/onCreateChat/createdAt)" 如何为 AWS 放大 GraphQL API 添加服务器端业务逻辑? - How to add server side business logic for a AWS amplify GraphQL API? AWS Lambda中的Spring Cloud Config Server - Spring Cloud Config Server in AWS Lambda Google Cloud / AWS:如何启动NodeJS服务器 - Google Cloud/AWS: How to start NodeJS server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM