5 ms·
I've used Netlify as a "Heroku for static sites". I deploy my React apps and landing pages there and don't need to worry about the underlying compute, or load
by veeralpatel979 7y ago
I've used Netlify as a "Heroku for static sites".
I deploy my React apps and landing pages there and don't need to worry about the underlying compute, or load balancing, or anything else. Thankfully I didn't do any frontend work before Netlify was available!
I don't really get all the hype around the Jamstack (https://jamstack.org/ https://jamstack.org/), though.
Netlify's hypothesis seems to be that if you deploy websites on CDNs, instead of on web servers, then you'll get better performance.
Also, because it's just a static site, there's no backend or database, so you get better security.
I accept this hypothesis, but it seems like you still need a backend. Netlify is promoting functions as a service [1] so you can avoid having web servers for the backend too, but I'm a little skeptical you get the flexibility to build applications with dependencies or non-trivial business logic or design with this approach.
If anyone's tried a FaaS and this is incorrect, please describe your experience!
[1] https://www.netlify.com/products/functions/ https://www.netlify.com/products/functions/
- meritt 7y ago> but it seems like you still need a backend Of course. It's just managed by someone else and you often are paying per usage. And you'll find yourself needing to wrangle numerous serverless platforms to actually build out relevant business logic if you want to do something meaningful, one third-party microservice at a time. > Also, because it's just a static site, there's no backend or database, so you get better security. It's not as trendy to think of it this way, but "static sites" are just caches with manual invalidation.
- mpoteat 7y agoIt might be more expensive in the long run, but it's an operational expense rather than a capital expense, which I would argue most software projects are.
- TeMPOraL 7y agoThey are only if you make them that way.
- dgb23 7y agoYou typically hook up changes in your data with static site rebuilds. Thinking of it as a cache has some merit, but it is more exciting to think of it as a event driven system as a whole, where instead of triggering a render on demand (user wants to look at something) you trigger it when a change happens. This pattern reduces the need for ad hoc caching and eliminates some accidental complexity as well because it reduces the coupling of management and representation.
- jacobpake 7y agoIn my experience you can achieve a lot with FaaS - but you still need an API, database and storage - which Netlify Functions doesn’t offer out of the box. I have a couple of sites deployed on Netlify with a ‘serverless’ backend deployed to AWS separately. Their functions are also limited to triggers relating only to Netlify events: https://docs.netlify.com/functions/trigger-on-events/#available-triggers https://docs.netlify.com/functions/trigger-on-events/#availa...
- VWWHFSfQ 7y agoNetlify is glorified S3 + Cloudfront hosting. They did a very good job at marketing "HTML5 hosting"
- dexterdog 7y agoIt's glorified in the sense that it's much cheaper. I have had small sites on s3 plus cf and have gotten a bill that boggles the mind because I could be hosting the content for free on netlify.
- wilkystyle 7y agoAs someone who is currently hosting a static site with S3 + CloudFront, I'd be interested to hear more about this. Were you hosting something more heavyweight than mostly text?
- chispamed 7y agoIf you regularly serve bigger files but have low traffic DigitalOcean S3 Spaces and a custom Cloudflare Workers CDN might be an interesting solution for you. Cloudflare Workers are based only on requests and priced at 5$/10M and if you cache everything heavily DO’s 5$ S3 plan should be enough for most use cases. (I’m not affiliated with either company)
- codebolt 7y agoAny devs out there with a Visual Studio/MSDN as subscription should also be aware of their free Azure credit. I get 50$/Mo, which is more than enough to host a static site with CDN (my blog typically runs at around 1-2$).
- city41 7y agoYou can also pair with something like firebase, userbase, etc.
- steve76 7y agoI kept a build script running open a Netlify, announcing to a websocket and everyone messages that, then the build reads the messages and generates static content. Now I'm working on sourcing from the Dat Project. I'm thinking with MDN Sync Manager, you can go device to device, sort of, and need no cloud platform at all. I keep a GCE free tier running so there's always a peer. Don't mind talking about it. Building something takes a ton of work and recently I got suck into a fp-ts black hole. It's awesome.
- pier25 7y agoCheck Zeit Now. You get cloud functions but you can almost architecture your code as if you were writing a monolith. Probably better as each function can be in its own language.
- ris 7y ago> Probably better as each function can be in its own language. That sounds awful. How do you share any of your common logic? Do you have to write versions of your important routines once in each language, each with its own set of quirks and bugs? It's bad enough in microservice land, where every time you want any shared code you have to extract it to a e.g. "utils" library and massage the versioning to get it in to the right apps. End result: most people don't and you end up with many different little versions of your routines that do important things.
- throwaway894345 7y agoI don’t think anyone is advocating for choosing a different language per function, but rather you can use the best language for the job. For example, we have a Python monolith that has one route that is CPU-bound and would otherwise be an ideal use case for a language with real multithreading. The Python version often times out (60s) while a native Go (or perhaps Java) version would probably be on the order of a single second. In our case the limitation is less about the monolith architecture and more about our team’s unwillingness to learn a new language.
- pier25 7y agoThis. Or maybe you need a dependency that is not available in your main language.
- ris 7y ago> a Python monolith that has one route that is CPU-bound and would otherwise be an ideal use case for a language with real multithreading Sounds nasty. The classic python answer is to try rewriting the innermost loops in cython/c/cppyy etc or try using numba/pypy. > best language for the job The problem with this "best ... for the job" phrasing is that there's an objectively, indisputably right answer, where I've experienced atrocious choices being inflicted upon a team under that guise, resulting in a component that nobody wants to maintain because it's foreign to everyone.