
Ask HN: Where do you host your API endpoint? - david90
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.<p>What is your choice?
======
Svenstaro
Bare metal on a server at Hetzner. I like keeping things simple.

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

~~~
lucaspiller
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.

------
rocgf
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.

~~~
smoyer
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.

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

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

------
kaishiro
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...

~~~
fauria
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/...](http://docs.aws.amazon.com/apigateway/latest/developerguide/how-
to-cors.html)

------
futhey
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 :)

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

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

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

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

~~~
futhey
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.

------
kennu
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.

------
trevordixon
I've been impressed with Google Apps Script
([https://script.google.com](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](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.

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

~~~
swah
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).

~~~
dr_win
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).

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

------
mrborgen
StdLib seems like an awesome alternative in this space:

[https://stdlib.com/](https://stdlib.com/)

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

------
MrSaints
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...](https://blog.arachnys.com/how-we-solved-load-testing-
scalability-issues-with-kong)). We found it far easier to configure than API
Gateway.

------
asadlionpk
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.

------
assafmo
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.

------
gmac
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 ...)

------
iDemonix
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.

------
parkeragee
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.

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

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

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

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

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

~~~
Svenstaro
Is docker old fashioned nowadays? :)

~~~
wjdp
Running your own host for it may be

------
Radeo
[http://pythonanywhere.com/](http://pythonanywhere.com/) is also a good
alternative.

~~~
l5870uoo9y
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).

~~~
gpjt
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.

------
Jakob
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?

~~~
david90
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.

------
hacksonx
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.

------
JCharante
Docker containers running on hyper.sh

I love their docker-like CLI.

------
ajainy
for snapcx ([https://snapcx.io](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.

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

Most big cloud vendors offer API management through their services.

~~~
nstj
Link?

------
anujdeshpande
API Gateway and AWS Lambda do it for me.

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

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

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

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

~~~
616c
So how much does this cost you on average?

------
codazoda
GitHub for static stuff.

Digital Ocean VPS for the rest.

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

------
sprt
App Engine

