[erlang-questions] setting up a VPS for dedicated erlang server

74 views
Skip to first unread message

Joe Armstrong

unread,
Feb 28, 2017, 11:15:12 AM2/28/17
to Erlang
Hello,

I was considering setting up a dedicated Erlang VPS for a small web
site with a few simple Erlang applications.

I was looking at the various hosting packages - and have to choose
the amount of memory I need - any ideas how much resident memory I
need to run a smallish server.

I guess all I need is an OS + Erlang - what is a suitable choice of
OS? - Do i really need GBytes of memory - it sounds a lot to me.

Any advice on VPS providers?

Cheers

/Joe
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Mark Geib

unread,
Feb 28, 2017, 11:25:01 AM2/28/17
to Joe Armstrong, Erlang
For linux based servers I recommend Digital Ocean. I have used them for 2 years now, very easy and prices seem good.

Mark.
signature.asc

Dmytro Lytovchenko

unread,
Feb 28, 2017, 11:26:53 AM2/28/17
to Joe Armstrong, Erlang
Erlang shell with a simple few module app feels comfortable on a 32-bit machine with 64MB memory, probably 32MB will be just as fine. So a 512Mb server which is the cheapest on many VDS hostings, will be far more than enough.

John Doe

unread,
Feb 28, 2017, 11:28:56 AM2/28/17
to Erlang
512Mb RAM ($5/month or less) is enough to process a few million hits/day if you don't have a lot of data in the database. I recommend DigitalOcean and OVH vps' to my customers. OS - debian/centos/ubuntu, does not matter much.
One caveat: assuming you use cowboy, you can't process all these hits in the context of webserver processes, because by default there are too many of them. You'll need a dedicated pool of 20-100 processes which will do all the heavy logic. Also I'd recommend to run gc:collect for all processes every 3-4 minutes, this would help to purge large binaries and won't slow down the system too much.


Michel Boaventura

unread,
Feb 28, 2017, 12:06:59 PM2/28/17
to John Doe, Erlang
I've been using Linode for the past 5 years and never had a problem.
Its smaller plan costs $5 for a VM with 1GB of RAM and if you pay
extra $2 you can have a backup add-on with 4 different slots (daily, 7
days, 14 days and a custom one). My brother-in-law had an awful
experience with Digital Ocean. The physical disk on which his VM was
stored had a problem and he lost all of his data. The solution given
by Digital Ocean was to give him a new (empty) VM.

--
Michel Almada de Castro Boaventura
Analista de Sistemas
Laboratório de Software Livre - LSL

Loïc Hoguin

unread,
Feb 28, 2017, 12:22:44 PM2/28/17
to Joe Armstrong, Erlang
You can get cheap dedicated servers (physical, not virtual!) at
kimsufi.com (OVH' cheapest lineup). The cheapest ones tend to be in
short supply but if you're patient enough to refresh the page early in
the day you can usually get one of the 5€/month ones.

No opinion on their VPS/cloud offerings, I don't see the point in that
if physical hardware is that cheap.

I personally have two of those, one of the cheapest, and one that is
currently not available anymore with 8GB of memory and a 2TB disk. I run
Arch Linux on them, same as my laptop.

--
Loïc Hoguin
https://ninenines.eu

Leo

unread,
Feb 28, 2017, 3:00:42 PM2/28/17
to Joe Armstrong, Erlang
2017-02-28 17:14 GMT+01:00 Joe Armstrong <erl...@gmail.com>:
Hello,

I was considering setting up a dedicated Erlang VPS for a small web
site with a few simple Erlang applications.

I was looking at the various hosting packages - and have to choose
the amount of memory I need - any ideas how much resident memory I
need to run a smallish server.

I have some servers that are running a docker-compose that contains 3 erlang applications (complete release in 3 different containers) + mongo.
(I know... probably it's overkill XD)
But with all this applications, 1gb of ram looks good enough for "normal" usage.

Leo

Leo

unread,
Feb 28, 2017, 3:01:08 PM2/28/17
to Joe Armstrong, Erlang
2017-02-28 17:14 GMT+01:00 Joe Armstrong <erl...@gmail.com>:
Hello,

I was considering setting up a dedicated Erlang VPS for a small web
site with a few simple Erlang applications.

I was looking at the various hosting packages - and have to choose
the amount of memory I need - any ideas how much resident memory I
need to run a smallish server.

I guess all I need is an OS + Erlang - what is a suitable choice of
OS? - Do i really need GBytes of memory - it sounds a lot to me.

Any advice on VPS providers?

Maybe you can find some advice here: https://deploystack.io/

Leo

Caragea Silviu

unread,
Feb 28, 2017, 3:20:37 PM2/28/17
to Erlang
Most probably the cheapest solution: https://contabo.com/?show=vps 7 euro/month for 6 GB and 2 cores
Silviu

Eric des Courtis

unread,
Feb 28, 2017, 5:29:17 PM2/28/17
to Erlang-Questions Questions
In my experience cheap VPS services tend to be flaky. Amazon offers EC2 instance for free for one year. I doubt you can get a more reliable setup for the price. 

https://aws.amazon.com/s/dm/optimization/server-side-test/free-tier/free_np/

Eric


Loïc Hoguin

unread,
Feb 28, 2017, 5:30:57 PM2/28/17
to Eric des Courtis, Erlang-Questions Questions
Great timing. :-)

On 02/28/2017 11:29 PM, Eric des Courtis wrote:
> In my experience cheap VPS services tend to be flaky. Amazon offers EC2
> instance for free for one year. I doubt you can get a more reliable
> setup for the price.
>
> https://aws.amazon.com/s/dm/optimization/server-side-test/free-tier/free_np/
>
> Eric
>
>
>
> On Tue, Feb 28, 2017 at 3:20 PM, Caragea Silviu <silvi...@gmail.com
> <mailto:silvi...@gmail.com>> wrote:
>
> Most probably the cheapest solution: https://contabo.com/?show=vps 7
> euro/month for 6 GB and 2 cores
> Silviu
>
> On Tue, Feb 28, 2017 at 7:04 PM, Leo <hach...@gmail.com
> <mailto:hach...@gmail.com>> wrote:
>
>
>
> 2017-02-28 17:14 GMT+01:00 Joe Armstrong <erl...@gmail.com

> <mailto:erl...@gmail.com>>:


>
> Hello,
>
> I was considering setting up a dedicated Erlang VPS for a
> small web
> site with a few simple Erlang applications.
>
> I was looking at the various hosting packages - and have to
> choose
> the amount of memory I need - any ideas how much resident
> memory I
> need to run a smallish server.
>
> I guess all I need is an OS + Erlang - what is a suitable
> choice of
> OS? - Do i really need GBytes of memory - it sounds a lot to me.
>
> Any advice on VPS providers?
>
>
> Maybe you can find some advice here: https://deploystack.io/
>
> Leo
>
>
>
>
>
> Cheers
>
> /Joe
> _______________________________________________
> erlang-questions mailing list

> erlang-q...@erlang.org <mailto:erlang-q...@erlang.org>
> http://erlang.org/mailman/listinfo/erlang-questions


> <http://erlang.org/mailman/listinfo/erlang-questions>
>
>
>
> _______________________________________________
> erlang-questions mailing list

> erlang-q...@erlang.org <mailto:erlang-q...@erlang.org>
> http://erlang.org/mailman/listinfo/erlang-questions


> <http://erlang.org/mailman/listinfo/erlang-questions>
>
>
>
> _______________________________________________
> erlang-questions mailing list

> erlang-q...@erlang.org <mailto:erlang-q...@erlang.org>
> http://erlang.org/mailman/listinfo/erlang-questions


> <http://erlang.org/mailman/listinfo/erlang-questions>
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions
>

--
Loïc Hoguin
https://ninenines.eu

Eric des Courtis

unread,
Feb 28, 2017, 6:08:09 PM2/28/17
to Loïc Hoguin, Erlang-Questions Questions
Haha yes I know! But it's a reality that Amazon is down much less than most VPS services.


            http://erlang.org/mailman/listinfo/erlang-questions
            <http://erlang.org/mailman/listinfo/erlang-questions>



        _______________________________________________
        erlang-questions mailing list

        http://erlang.org/mailman/listinfo/erlang-questions
        <http://erlang.org/mailman/listinfo/erlang-questions>



    _______________________________________________
    erlang-questions mailing list

Fisher, Paul

unread,
Feb 28, 2017, 6:09:06 PM2/28/17
to Eric des Courtis, Loïc Hoguin, Erlang-Questions Questions

Best advise is to stay out of us-east-1...


--

paul

Fellow, Engineering


From: erlang-quest...@erlang.org <erlang-quest...@erlang.org> on behalf of Eric des Courtis <eric.des...@gmail.com>
Sent: Tuesday, February 28, 2017 5:07:58 PM
To: Loïc Hoguin; Erlang-Questions Questions
Subject: Re: [erlang-questions] setting up a VPS for dedicated erlang server
 
Confidentiality Notice | This email and any included attachments may be privileged, confidential and/or otherwise protected from disclosure. Access to this email by anyone other than the intended recipient is unauthorized. If you believe you have received this email in error, please contact the sender immediately and delete all copies. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

Nathaniel Waisbrot

unread,
Feb 28, 2017, 6:52:21 PM2/28/17
to Eric des Courtis, Erlang-Questions Questions
> In my experience cheap VPS services tend to be flaky. Amazon offers EC2 instance for free for one year. I doubt you can get a more reliable setup for the price.



The free tier is nice if you're interested in getting into Amazon (it's a frequently requested resume item). But I used the "free" tier, thought I was being careful, and got slapped with $60 in charges from network traffic before I could shut things down. There is no way to tell Amazon "I would rather go offline than pay $x", so a misconfigured cron job or traffic spike (DDoS?) that happens while you're asleep is basically guaranteed to cost you.

fran

unread,
Feb 28, 2017, 11:33:39 PM2/28/17
to Joe Armstrong, Erlang
my stack

Nitrogen web framework: best, simpler and capable web framework in the world
using Cowboy webserver

and in the vps, VPSDIME, a very cheap 7$: 6G, 4cpu, 30GB ssd, 2TB, 10gbps

couldn't be more satisfied

Igor Clark

unread,
Mar 1, 2017, 5:24:50 AM3/1/17
to Erlang-Questions Questions
Bit late to this party but I really like https://www.scaleway.com/ -
they're European (Paris/Amsterdam), and they provide cheap, decent-spec
VPSs, as well as their "Bare metal" range which is own-design,
custom-build, multi-tenant hardware. I use one with 4-core/8GB/50GBSSD
for €11.99/month. And you get unmetered bandwidth at a decent fixed rate
(300mbps on my package), so you don't get out-of-control bandwidth
charge horror stories. And no, I don't work there, I just think they're
really good :-)

Hugo Mills

unread,
Mar 1, 2017, 5:35:55 AM3/1/17
to Igor Clark, Erlang-Questions Questions
On Wed, Mar 01, 2017 at 10:24:39AM +0000, Igor Clark wrote:
> Bit late to this party but I really like https://www.scaleway.com/ -
> they're European (Paris/Amsterdam), and they provide cheap,
> decent-spec VPSs, as well as their "Bare metal" range which is
> own-design, custom-build, multi-tenant hardware. I use one with
> 4-core/8GB/50GBSSD for €11.99/month. And you get unmetered bandwidth
> at a decent fixed rate (300mbps on my package), so you don't get
> out-of-control bandwidth charge horror stories. And no, I don't work
> there, I just think they're really good :-)

I'll second Scaleway. It's Just Worked for me.

The other recommendation I've got is a small company called Bitfolk
(http://bitfolk.com). More expensive than many of the larger
operators, but the quality of the support is superb. (Disclaimer: I've
known the owner of the company for many years; I own two Bitfolk VMs
and manage a third).

Hugo.

> On 28/02/2017 23:52, Nathaniel Waisbrot wrote:
> >>In my experience cheap VPS services tend to be flaky. Amazon offers EC2 instance for free for one year. I doubt you can get a more reliable setup for the price.
> >
> >
> >The free tier is nice if you're interested in getting into Amazon (it's a frequently requested resume item). But I used the "free" tier, thought I was being careful, and got slapped with $60 in charges from network traffic before I could shut things down. There is no way to tell Amazon "I would rather go offline than pay $x", so a misconfigured cron job or traffic spike (DDoS?) that happens while you're asleep is basically guaranteed to cost you.
> >
> >_______________________________________________
> >erlang-questions mailing list
> >erlang-q...@erlang.org
> >http://erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions

--
Hugo Mills | We are all lying in the gutter, but some of us are
hugo@... carfax.org.uk | looking at the stars.
http://carfax.org.uk/ |
PGP: E2AB1DE4 | Oscar Wilde
signature.asc

Joe Armstrong

unread,
Mar 1, 2017, 6:09:09 AM3/1/17
to Hugo Mills, Erlang-Questions Questions

Joe Armstrong

unread,
Mar 1, 2017, 6:28:31 AM3/1/17
to Hugo Mills, Erlang-Questions Questions
Thanks for all your reply - I shall choose one of these and give it a try.
It seems there is a lot of choice.

Next problem.

Given that I have decided on a VPS and payed the $$$ - what I now have
is a raw machine and some kind of admin interface.

The admin interface will (I guess) allow choice of an OS and set up a few
basic things - at the end of which I assume I can do an SSH login and then
I'm free to play.

The next step is that I want to setup a whole load of things to make the machine
minimally useful - install Erlang etc.

All the installation commands and paths and environment variables and so
will depend upon my choice of OS - it would be nice to just run a local
script (on my machine at home) that automates as much as possible of this.

But what I'd prefer to do is abstract away from the package manager and say
Locally

$ remote_install <my VPS> erlang

If my remote machine was a linux machine this might cause an 'apt get command'
to be issued remotely - if the remote machine was windows it would do
a chocolatey command - it it were a mac it would do a brew command

Is there anything remotely like this???

Has anybody any advice on the best way to proceed. Or do I have to write
a long 'rsh' script :-(

(And no I'm not looking for an expensive tool that does *everything* and has
a 400 page manual - just something simple)

Cheers

/Joe

Hugo Mills

unread,
Mar 1, 2017, 6:41:29 AM3/1/17
to Joe Armstrong, Erlang-Questions Questions
If you intend having a small number of choices for the whole system
(i.e. only one Ubuntu configuration, only one Windows configuration,
only one Fedora configuration), and simply want to be able to deploy
that configuration repeatedly, then many VM providers will give you
the ability to build deployment images.

If you want more flexibility (i.e. you might want an Ubuntu
configuration with Postgres installed one time, and one with RabbitMQ
installed a second time), then you're looking more into the area of
configuration management systems like Puppet or Chef or Ansible. I use
Puppet -- it's a pain in the arse, but that's more to do with (a) the
problem space: completely automating an installation and site-specific
configuration for a bunch of arbitrary packages takes time and effort,
and (b) the fact that I'm not really a practised sysadmin and don't
much enjoy it. For simple things (installing packages, or managing
basic configs of popular and well-known packages like Apache or
Postgres), Puppet is pretty straightforward, and you can get
_something_ working quickly. It's probably no more effort in the long
term than writing and maintaining a bunch of complicated shell
scripts, and ultimately more reliable.

Hugo.
Hugo Mills | Great oxymorons of the world, no. 7:
hugo@... carfax.org.uk | The Simple Truth
http://carfax.org.uk/ |
PGP: E2AB1DE4 |
signature.asc

Adrian Roe

unread,
Mar 1, 2017, 7:19:06 AM3/1/17
to Hugo Mills, Erlang-Questions Questions
Joe

I agree that tools such as Puppet etc are a good way to go if you are operating at scale but there is an element of 400 page manual about Puppet and other tools.

It sounds to me as though your use-case would be well met with a simple shell script.  We have one that builds a CentOS dev environment (so yum rather than apt-get) that would be very easy to tailor.  More than happy to send you a copy, but there’s no rocket science to it!

One bit of advice if you do go down the “just a few shell scripts” route would be that you are well served to run all your sessions on the remote server in something like tmux or screen as that will allow your session to continue running should you have a temporary network break between you and the server.  It’s so very frustrating if you get most of the way through an instal to have it randomly killed in some arbitrary state if your local network glitches…

Adrian

Marco Molteni

unread,
Mar 1, 2017, 7:22:02 AM3/1/17
to Erlang-Questions Questions

> On 1 Mar 2017, at 12:28, Joe Armstrong <erl...@gmail.com> wrote:

..

> But what I'd prefer to do is abstract away from the package manager and say
> Locally
>
> $ remote_install <my VPS> erlang

..

You are entering the realm of what is called orchestration or configuration management.

I don't think there is a "simple script" do do what you want.

On the other hand, last-generation configuration management tools like SaltStack and Ansible allow to do exactly that, and way more. You could even take a additional step back and provision the VM with APIs like OpenStack, but probably it would be over engineering for your use case.

Since we are functional :-), an alternative approach (not exactly the same thing) is http://nixos.org/ and http://nixos.org/nix/, which should really excite any Erlanger :-)

marco

Mykola

unread,
Mar 1, 2017, 10:53:39 AM3/1/17
to Joe Armstrong, Erlang-Questions Questions
Joe,

I can recommend to take a look at Vagrant and play locally with provisioning. There is many different provisioners supported out-of-box, so you can choose a most comfortable/suitable one.
I have started from shell scripts, then used Ansible, and actually using Puppet. Key feature for my case - Puppet executed on guest system, so I don't need Puppet installed at host system - only Puppet modules near to Vagrantfile.


--
Mykola

Oleksii Semilietov

unread,
Mar 1, 2017, 12:25:27 PM3/1/17
to Joe Armstrong, Erlang-Questions Questions
I believe Ansible the simplest way to do it.  It much simpler than Chef or Puppet and works just on top of ssh.

Also, in Haskel community quite popular Nix (https://nixos.org/nix/) with NixOps.
I played with it few month ago and I think it worth to play with.
I implemented simple Cowboy web application, then wrapped it as Nix package and module where I creating systemd service on port 80 and start it.
Samples how to get it with Erlang could be found in my playground repo: https://github.com/spylik/zlr-nix

But sure, Ansible is much simple.

Cheers

--
Oleksii D. Semilietov

Dmitry Klionsky

unread,
Mar 2, 2017, 3:19:40 AM3/2/17
to erlang-q...@erlang.org
I also recommend Ansible for its simplicity.
-- 
BR,
Dmitry
Reply all
Reply to author
Forward
0 new messages