AppSync vs running Apollo in Lambda

Поделиться
HTML-код
  • Опубликовано: 8 янв 2025

Комментарии • 20

  • @dancoman8
    @dancoman8 Год назад

    Great explanation. You can use serverless-plugin-warmup to solve the cold start problem. Essentially you have more flexibility and control with Apollo Server.

    • @theburningmonk
      @theburningmonk  Год назад +2

      That's a crutch and is not something people should be doing anymore. It only works when you have really low throughput (and a handful of concurrent executions) and it can actually induce more cold starts if your ping occupies the lambda workers while a user request comes in at the same time. Nowadays, you should use Provisioned Concurrency instead if you need to keep Lambda workers warm, but that's kinda expensive and adds a fair bit of operational overhead.

  • @theburningmonk
    @theburningmonk  Год назад

    This is a free preview lesson from the AppSync Masterclass, where you will learn to build scalable and performant GraphQL APIs by building a Twitter clone with AWS AppSync, Lambda, DynamoDB and Vue.js. To learn more, please visit appsyncmasterclass.com.
    You can get 15% OFF with the code "RUclips15" during checkout. Hope to see you in the course!

  • @JanekBogucki
    @JanekBogucki Год назад

    AWSSync Merged Schemas are similar to Apollo federation.

    • @theburningmonk
      @theburningmonk  Год назад

      Yup, they're very similar, but AppSync Merged API (that's the official name) is a build-time solution instead of a runtime one like Apollo Federation so there's no need for a gateway at the front of it all. Instead, all the resolvers for the individual APIs are copied over to the Merged API.

  • @superpcstation
    @superpcstation 2 года назад +1

    Hi Yan, hope you are feeling better. Is the course finalized now? is it a good time to start watching? Also, do you plan on keeping it up to date? Thanks

    • @theburningmonk
      @theburningmonk  2 года назад +2

      Hey, thanks! Got over COVID but came down with a viral infection unfortunately.. not had the best of luck with travel lately! The course was completed a few months ago. If you haven't watched it for a while, now's a good time to go back to it. I do plan to keep the theory-based lessons updated where possible, but the coding modules are a different beast, because if you change one thing in lesson 1, it'll have knock-on impacts on lessons 2-N. So instead, you'll find some "update DD/MM/YY lessons` dotted throughout the course to tell you about new announcements that are relevant to the things you just learned in the previous lesson(s).

    • @superpcstation
      @superpcstation 2 года назад

      @@theburningmonk thanks for the update Yan. Get well soon :)

  • @Sv-ry9lj
    @Sv-ry9lj 2 года назад

    What about the cost of running Apollo server on lambda and AppSync. Honestly if not for VTL probably AppSync will be my choice too.

    • @theburningmonk
      @theburningmonk  2 года назад +4

      It's hard to say because Lambda cost depends on execution duration and memory allocation, AppSync's doesn't. But you have to factor in the cost of engineering time to develop the additional features that you might need and that AppSync provides out-of-the-box, especially things like group-based auth with Cognito, which can take a bit of work. Oh, and if you use API Gateway in front of Lambda, then you have to account for the cost of that too when doing the comparison.
      But I think a bigger problem is likely performance, at least for APIs that don't have a steady traffic pattern, because of the Lambda cold start times and other overheads that you'd be adding into the mix.

    • @Sv-ry9lj
      @Sv-ry9lj 2 года назад +1

      @@theburningmonk Thanks for the reply. Yea true. So many good features in AppSync out of the box. Group based auth is good. But I couldnt quickly work out Permission Based on Specific resource based auth in AppSync so I will have to dig deeper. Anyways thanks a lot for the video and your reply :)

    • @logusgraphics
      @logusgraphics 2 года назад +1

      You can now run lambda runtime resolvers instead of VTL

    • @Sv-ry9lj
      @Sv-ry9lj 2 года назад +1

      @@logusgraphics what about the cost? cost of lambda as well as AppSync right? Whereas VTL there is only AppSync cost. IIRC

    • @RedCloudServices
      @RedCloudServices 5 месяцев назад

      what would you suggest for a basic federated schema and only a few org users?

  • @JanekBogucki
    @JanekBogucki Год назад

    AWSSync suppports JavaScript as an alternative to VTL.

    • @theburningmonk
      @theburningmonk  Год назад

      Yes, that came out a little while back. But for the time being, JavaScript resolver is only supported for pipeline resolvers, not unit resolvers. So for all your unit resolvers, you'd have to turn them into pipeline resolvers with a single function if you want to take advantage of that.

  • @mr.random8447
    @mr.random8447 2 года назад +1

    Hitting multiple AppSync endpoints defeats one of the main benefits of GraphQL, its just like REST like you said.

    • @theburningmonk
      @theburningmonk  Год назад +1

      Since I recorded the video, AppSync has added support for Merge APIs, which allows you to merge the schema from multiple (up to 10) APIs so you can have a single point of entry for the client application. It works differently to Apollo federations in that it's a build-time solution and doesn't require a separate gateway at runtime.