Hacker News new | comments | show | ask | jobs | submit login
Ask HN: Where do you host your API endpoint?
51 points by david90 8 months ago | hide | past | web | favorite | 62 comments
Just for some news feed like contents - it might be troublesome to launch an instance of the single purpose. Looking into Google spreadsheet as API endpoint.

What is your choice?




Bare metal on a server at Hetzner. I like keeping things simple.


Running your own RAID on top of a handful of unreliable (probably used) disks is an unusual definition of simple in my book.


If you know what you are doing vs the latest IaaS fad, it's going to be a lot easier and probably cheaper doing that.


When you architecture your stuff correctly, you don't need RAID.


Is there a reason why you would not virtualize (use ESXi/Proxmox, etc) the server?


That's a lot less simple as now you suddenly have multiple machines to handle (even if they're virtual). Whenever I really want something like that, I'll usually use systemd-nspawn or docker depending on the use case.


Whats the benefit?


IBM Bluemix used to have a free tier for containers, which you could use to run tiny apps quite easily and cheaply, using the native Docker CLI. They've since moved to Kubernetes and still have a free tier, but not sure how that works.

I'd probably recommend a DigitalOcean VPS though. Cheap, very stable (had a couple VPS for a year with 100% uptime, as far as I know), stellar support and a lot of new functionality being added lately - block storage, firewall, load balancing. DO is one of the best services I've paid for.

Disclosure: I used to work at IBM about a year ago, in the container service team.


Redhat's OpenShift 3 runs containers on Kubernetes under the covers. So far we haven't found a way to directly manage OpenShift via kubectl.


Huh? You can just use kubectl. Maybe I am missing something.


I think that I'm the one that's missing something!


We started with API Gateway + Lambda, but recently migrated to Google Cloud Functions. The overhead to spin up new funcs w/ endpoints is trivial, as is rolling in CORS and even some auth if you really want (we're using Firebase Auth). It was a big deal paradigm shift for us. Whether that's because it's a fun product or because I'm just awful at AWS is, well...


AWS recently added an "Enable CORS" option in the resources "Actions" menu that makes that task much easier: http://docs.aws.amazon.com/apigateway/latest/developerguide/...


do you auth API Gateway requests?


I'm using now.sh, really nice for a node/express based API endpoint. Ours seems to scale very cheaply and deployments are, dare I say, fun :)


Sounds great, where do you host it? AWS / heroku?


now provides the hosting abstraction [1], sounds like internally they choose whichever one is cheapest.

[1] https://zeit.co/now#features


Rad. I did not know this. Where is your database hosted?


Mlab.com (also inexpensive if your needs are reasonable), with a lot of our stuff being handled with s3 bucket storage. Sorry for the late response.


Amazon API Gateway + Lambda, managed by Serverless Framework. Practically free to use for small purposes.

For static content that can be (re)published as needed, I'd use S3 + CloudFront and a scheduled or triggered Lambda that handles the publishing.


I've been impressed with Google Apps Script (https://script.google.com) for little things. Define a doGet (or doPost) function, and it will be called for HTTP requests.

https://developers.google.com/apps-script/guides/content has a tiny example where they fetch an RSS feed, transform it, and serve the result.

You also have very easy access to Google services, so you can read from and write to Google spreadsheets, Drive, Gmail, etc.


DigitalOcean VPS running docker containers (for $10/mo).


I also run on DO but haven't deploy with docker. What are the greatest benefits in your opinion? (I only run little experiences for now, but would also like to run small client backends).


The biggest benefit for me is isolation. I keep the main system clean. Just install fish shell and glances there. And all messy stuff required by projects is isolated in individual containers. They can be rebuilt from scratch if needed and don't pollute the main system (except for well-defined data folders).


I have run DO + Docker and the reason I do it is because it makes deployments dead simple. Through up Ngnix as a reverse proxy to the port that is exposed through docker and you're done. I'm deploying an Elixir/Phoenix app, so it makes dependency management dead simple too with not having to worry about versions of Elixir/Phoenix and it makes changing droplets a breeze too, since the only pre-reqs to install are docker.


+1 for DigitalOcean and docker containers.


Heroku. That https://github.com/Miserlou/django-zappa looks awesome, but I didn't try it out yet.


StdLib seems like an awesome alternative in this space:

https://stdlib.com/

I've seen the founder setup some impressing services in a matter of minutes.


We use a combination of Lambda, ECS (for slightly larger services), and Heroku to host them. And, we use Mashape's Kong in front of them for authentication / authorization, and logging (see https://blog.arachnys.com/how-we-solved-load-testing-scalabi...). We found it far easier to configure than API Gateway.


Kubernetes on Azure and GKE for main projects (high traffic)

If your projects are lightweight / low traffic, check out Flynn. You get to push code directly to flynn and skip the docker workflow (push commit to github -> docker builds image -> kubernetes updates pods, this takes time ofcourse). Flynn can also create DB for you.

Or you can just use firebase.


Github pages for static content (can even run a cron job every minute to uodate and then push)

and webtask.io for lambdas, which have a nice free plan (1 req/seq) - this is mostly for personal stuff, haven't tried yet their paid plan.


CloudFormation -> RDS + Elastic Beanstalk + Lambda.

Formerly Heroku, but now only for toy projects: their approach to pen testing and the insecurity of their Postgres setup count heavily against them, and they're expensive (I keep meaning to write a blog on these points ...)


Digital Ocean. It's cheap, easy, has an API and tons of great documentation. The web interface is easy to use, the new floating IP and free firewall (also has an API and UI) really tops it off. Had no real problems outside the maintenance windows.


If you're just starting out or testing something and need it online all the time, Heroku's Hobby plan is only $7/month and deployments are super easy.

I've used this method when deploying Hapi.js APIs and need them out quickly.


Kubernetes :) Heroku's free tier seems to be a popular choice for side projects.


Kubernetes is not a "where", more like a "how". Where do you host/rent your kubernetes?


Am I understanding you correctly, Kubernetes on Heroku? How?


I think parent means K8s for main projects and heroku for side-projects.


Yes, that's what I mean. Kubernetes is probably overkill for small side-projects.


Old-fashioned answer: docker on a dedicated server at OVH or VPS


Is docker old fashioned nowadays? :)


Running your own host for it may be


Ditto. Dedicated hardware at packet.net, OVH, ServerStadium, HostVirtual. Recommend WebHostingTalk.com forums offers sections for good deals on dedicated servers, VPS. Using docker / dokku


http://pythonanywhere.com/ is also a good alternative.


I don't really find Pythonanywhere useful for anything other than hobby sites. I mean no gracefull restart, no caching on static assets and slow SSL encryption (not cached on the web server).


PythonAnywhere dev here: fair point re: the caching of static assets, but could you give a bit more information about the SSL and the graceful restart? All of that should work fine.


It doesn’t seem then that your response is dynamic? You could generate a static file every now an then and host it wherever you want, no?


Some how you can consider it as a news feed use case. So will need update from time to time. Being too static will be hard for managing the content.


I have a few services running on Heroku. Not a favourite amongst many but I've been using it for a while and it works well for me.


Docker containers running on hyper.sh

I love their docker-like CLI.


for snapcx (https://snapcx.io) apis, we use 3scale for API Management and Linode VMs for running java apps as web services. Along with combination of Linode LB and 3scale provided reverse config for nginx, makes our responses sub-seconds.


We use Apigee, now know as Google Sense (API Management framework)

Most big cloud vendors offer API management through their services.


Link?


API Gateway and AWS Lambda do it for me.


Last time I looked API Gateway didn’t support gzip making it prohibitive for longer XML or JSON responses. Is it still this way?


AWS ECS less powerful than k8s, but easier to configure for high availability, multi AZ/region, etc.


Firebase - Free for small projects and very nice integration with frontend and node applications


3 f1.micro nodes k8s on GKE for hobby side projects:)


So how much does this cost you on average?


GitHub for static stuff.

Digital Ocean VPS for the rest.


Ditto. I use a GitHub webhook on a production branch which securely calls a deploy.php script, which triggers a git pull.


App Engine




Applications are open for YC Summer 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: