mess110 / coinmarketcap.northpole.ro

A straightforward JSON API for all the currencies and assets found on coinmarketcap.com crawled every 5 minutes
MIT License
41 stars 11 forks source link

Status Endpoint #29

Closed vanlooverenkoen closed 7 years ago

vanlooverenkoen commented 7 years ago

Is it possible to create a status endpoint?

for example

/status -> Under Maintenance -> Under Heavy Load -> Server Down -> Ok

jupiter50 commented 7 years ago

One suggestion @vanlooverenkoen: you can also run the files on your own server like myself and others? That way you have full control

vanlooverenkoen commented 7 years ago

Yeah but that will cost me a lot of money. Where do you host?

jupiter50 commented 7 years ago

Not really, you can get cheap hosting for about $5 a month. I use my server for a number of things so pay a lot more

vanlooverenkoen commented 7 years ago

Yeah but most of the time you need to pay extra for a database.

vanlooverenkoen commented 7 years ago

And where do you host?

jupiter50 commented 7 years ago

This app doesnt need a database. It writes JSON files to the file directory

vanlooverenkoen commented 7 years ago

Oke, I didn't know that. Where do you host your website?

mess110 commented 7 years ago

Taking the load off my server is nice because it allows me to keep the server costs low.

Traffic seems to have increased and sometimes the script runs for more than 5 minutes and another script is triggered and memory gets full etc.

This is the first time I am starting to have some resource issues, will see how I address this. Pending

jupiter50 commented 7 years ago

My 2 cents for what it's worth is that you already generous with your time, it's not really fair on you to also stump up more expense on higher server costs. Your small server is useful to validate and check and see how your application works but anyone looking to use this data for anything beyond all that should either move to their own server or compensate you on an ongoing basis for server costs.

vanlooverenkoen commented 7 years ago

Yeah I know but my application is used by 15 people daily, Could that realy be the problem? And if I host it myself? The resource issue will probably return.

jupiter50 commented 7 years ago

What is your application? What are the exact calls they are making? If you host it yourself, you have control of scaling your server to meet demand. e.g start small and incrementally upgrade as load increases

vanlooverenkoen commented 7 years ago

https://play.google.com/store/apps/details?id=be.vanlooverenkoen.cryptochecker

This is my application.

jupiter50 commented 7 years ago

What's your plan when you have 100 or 1000 or 10000 users?

I can't speak on Cristian's behalf but I personally think its a bit unreasonable for someone to expect him to cover the costs of being someone's back end service. By maxing his server, you are affecting others like me who occasionally use his server to validate any issues on my own server or see the impact of any application changes hes made before rolling it out on mine

vanlooverenkoen commented 7 years ago

Yeah I know, that's why I asked where you host?

jupiter50 commented 7 years ago

It doesn't matter where I host mine, you just need to find a Linux based hosting (nearly all hosting companies) that you can afford. Check out for recommendations http://www.webhostingtalk.com/forumdisplay.php?f=1

vanlooverenkoen commented 7 years ago

And I need to look for Ruby hosting? Or just linux?

jupiter50 commented 7 years ago

@mess110 can probably better comment on what hosting he uses and what his app needs but if you get Linux then you should be able to install Ruby or whatever else you/the app needs

vanlooverenkoen commented 7 years ago

But that will always be a vps? or am I wrong?

jupiter50 commented 7 years ago

I guess it depends on what package you go for and what rights the company will give you. But I believe VPS gives you the most access and freedom (which is what I have). This is more expensive though so Cristian might be able to recommend what his hosting is

vanlooverenkoen commented 7 years ago

Would you recommend to host it on a raspbery pi 3?

mess110 commented 7 years ago

Regarding hosting, any VPS will do. I also prefer that option due to the flexibility of a VPS. Any Linux based VPS should do. It is what I also use for this project.

More info on how I am temporarily addressing this issue:

https://www.reddit.com/r/coinmarketcapjson/comments/6wrv72/new_version_v8_is_stable/

vanlooverenkoen commented 7 years ago

any recomendations about cpu cores, speed and amount of ram?

vanlooverenkoen commented 7 years ago

and how much space does your server need?

mess110 commented 7 years ago

It is currently hosted on a server with 2 virtual CPUs, 1GB RAM and 30GB disk space. Please consider the server has quite a big load on it, normally that should suffice

vanlooverenkoen commented 7 years ago

Oke, I will take a look at it. I also have a synology nas at home. I wil take a look at that first