14
31 Comments

Server or Serverless for the backend? What do you use?

Yesterday I've asked the IH community for front-end & back-end stuff we're using to build our projects and some answers are very interesting.
https://www.indiehackers.com/post/b71b909fd0

There were some technologies I've never heard of.

Now there is another question I want to

  1. 3

    Sorry for any typos it's very late for me but it's the only time I can chat on this site.
    For new applications I tend to choose a cloud native architecture instead of monolithic on a single server. The advantages are :

    • fault tolerant
    • zero downtime during upgrade
    • scale with traffic
      I have tried microservices solution with kubernetes and Service fabric. They are both great (SF is simpler IMO) but you pay the cluster even with 0 traffic, so not very good for projects just starting or MVP with a low budget. They are also complicated to manage, not ideal for small team or solo dev.
      Serverless is a great option, you keep the advantages above, maybe lose some perf but zero traffic is almost zero cost.
      I see more and more devs embracing the serverless model. I am doing the same and right in these days I am converting a simple application I had to serverless. I especially like the Azure offer in serverless with their durable functions. Now they also have in preview a programming model similar to actor model, where some type of functions (called entities) can handle a state attached with them. With this model you just have to focus on the code and almost forget the infrastructure , which for a solo dev is great.
      Another thing I like about serverless is that if you pair it with static React pages calling serverless backend API you can build a dynamic web app costing pennies. Again this is great for us indie hackers. This is just a use case, the you have IoT, chatbots, and many others...
    1. 1

      I tend to choose a cloud native architecture instead of monolithic on a single server. The advantages are :

      • fault tolerant
      • zero downtime during upgrade
      • scale with traffic

      The irony is that a monolith written in Erlang or Elixir (my server stack of choice) gets you exactly these advantages, plus the ability to do upgrades without disrupting application state!

    2. 1

      One thing that holds me back to use front-end JS frameworks for most of my apps is SEO. I need it. So the only way for me is to use something like NextJS or NuxtJS with server-side prerendering.

      1. 2

        I highly recommend Nuxt.js with Adonis.js in the backend, then use microservices (I love Zeit Now) for helper functions and repeated tasks.

        1. 1

          Have used NuxtJS and Zeit. Will take a look at AdonisJS, thank you.

  2. 2

    I would go with a server and a back-end MVC framework every time, for productivity reasons. Nothing matters more than getting to the market quickly and iterating quickly.

    If and when I hit ridiculous scale or had extremely spiky usage patterns, I'd look at more FaaS-type offerings.

    1. 1

      This is exactly what I do. Vue in the frontend. Laravel or NodeJs in the backend. Hosted on VPS.

      1. 1

        Laravel + Vue + Digital Ocean is not only a great fit, but everyone from Jeffrey Way to Adam Nathan teaches it.

        1. 2

          This is why TailwindCss came to my stuff ;)

    2. 1

      This comment was deleted 3 years ago.

  3. 2

    I use a couple of VPSs hosted by digital Ocean that's served by their load balancer. Not had a single glitch or issue with then and nice simple interface and APIs.

    1. 1

      I use the same approach just with BuyVM, Hetzner, and Ramnode. No issues so far.

  4. 2

    I'm currently evaluting AWS appsync + DynamoDB for my side project. Would be complete serverless.

    1. 1

      Never heard of AWS appsync before.

  5. 2

    Serverless doesn't exist. There is always a datacenter somewhere full of harddrives and microchips. The real question is how much managed services are you using and what kind.

    1. 1

      Yes, that's true. Don't know who is behind the word "Serverless" :)

      1. 1

        It's "serverless" in the sense that, as a developer, you don't have to worry about the server. But yeah, a bit of a confusing name...

        1. 1

          Kind of like "static" sites that have 1mb of scripts running on them and all kinds of interactivity!

  6. 1

    Why not sit in the middle with shared serverless tech 🙂 https://hyper.host is a shared cloud environment that provides a fully load balanced auto scaling solution. When your site takes off and needs extra resource it has access to a private dedicated server during peak times, at no extra cost to you 🙌 - All for the price of shared hosting..

  7. 1

    We now rent a relatively cheap VPS. Before that we have used AWS.

    When already familiar with Linux, and interested in how this stuff works, you learn a lot and it really worked very fast. I had no experience in hosting and it was about a week to get everything together. We now have a Debian Server running Postgres and Nginx .

    When we need to scale I would probably start using Docker or some CAI tool like Ansible or Terraform. I really like to learn this sort of stuff and I consider it worth to invest the extra time.

    AWS is incredibly expensive for a backend which was the main point for moving away from it.

    1. 1

      Same here. MySQL + Nginx on the Ubuntu 16.04 and cheap VPS.

  8. 1

    We are using both serverless and dedicated instances. Any endpoints that take more hits are moved to lambda. Rest of the application code is server in a t2 medium Ec2 instance. Our DB is in MongoDB atlas.

  9. 1

    Google Cloud Run. It's automatic, autoscaling, and amazing.

  10. 1

    Trunk is a monolithic app spread across 7 instances on Google Cloud which I can scale up or down based on load. I don't use serverless for this since the nature of the app is very infrastructure and backend heavy.

    I do have a few containers deployed on Google Cloud Run (serverless) for handling CI notifications to Slack, triggering CI runs from GitHub, as well as some other custom behavior.

  11. 1

    I had a VPS for a long time, about 3 years ago I migrated to Azure. I really like the way the world is heading with all the tools available. In the past 10 years businesses have gotten a lot better at just purchasing tools vs. making devs constantly rewrite the wheel. I myself have bought into this philosophy, I'd much rather pay a few dollars a month to have the functionality written, and save myself hours of rehashing code.

    This breaks into
    Azure for my backend.
    Auth0 for authentication.
    Azure blobs for file storage.

    1. 1

      Why did you decide to go with Azure instead of AWS?

      1. 1

        I'm not sure if this is true anymore but at the time time it was cheaper. I have a SaaS that does video streaming. AWS was cheaper to host the videos, but Azure had much cheaper data-out pricing.

        Also in my opinion Azure is a lot easier to use. It took me a long time to understand the AWS user interface.

        1. 1

          Agree with you. AWS interface/UX is just a nightmare.

  12. 1

    I use FaaS (I think it's a better name than Serverless) for my service: tayl.app. While it impacts developer experience negatively (deployments are slow, which impact dev cycle time), I prefer this over managing and provisioning servers.

    But as always, it depends on the use-case.

    1. 1

      Yes, agree with you when it comes to FaaS

  13. 1

    For Spike.sh, I'm using both. I have an EC2 instance for dashboard and the main engine. However, I use https://zeit.co for receiving events from multiple integrations which is completely serverless.

    DB is on MongoDB Atlas now.

    1. 1

      This is really interesting combination. I've heard of MongoDB Atlas just yesterday.

Trending on Indie Hackers
After 10M+ Views, 13k+ Upvotes: The Reddit Strategy That Worked for Me! 40 comments Getting first 908 Paid Signups by Spending $353 ONLY. 20 comments 🔥Roast my one-man design agency website 18 comments Launch on Product Hunt after 5 months of work! 16 comments Started as a Goodreads alternative, now it's taking a life of its own 12 comments Join our AI video tool demo, get a cool video back! 11 comments