ungleich-staticcms/content/u/blog/how-to-run-your-browser-in-the-cloud/contents.lr

96 lines
3.4 KiB
Text
Raw Normal View History

2019-11-18 11:23:34 +00:00
title: How to run your browser in the cloud
---
pub_date: 2019-11-18
---
author: Nico Schottelius
---
twitter_handle: NicoSchottelius
---
_hidden: no
---
_discoverable: yes
---
abstract:
Finally, freeing my notebook from memory and CPU pressure
---
body:
So I have this problem: no matter which notebook I buy, some
applications are always to "heavy" for it. Notably running two
browsers has so far exhausted the available RAM on my notebook.
## The Pros and Cons of the cloud
For many years I have the strict policy to be able to work
autonomously with my notebook. So moving parts of what I use to the
2019-11-18 11:29:50 +00:00
cloud was rarely an option. I want to be able to work offline.
2019-11-18 11:23:34 +00:00
However this comes with a drawback that switching the notebook can be
2019-11-18 11:29:50 +00:00
a bit cumbersome. So I migrated to a git + nextcloud + imap
2019-11-18 11:23:34 +00:00
based setup in which all "small files" (notes, source code, etc.)
reside in git repositories and "big files" (photos, videos, etc.)
reside in Nextcloud.
One thing I always want to have locally, are my emails, which I read
in [emacs](https://www.gnu.org/software/emacs/)
(using [mu4e](https://www.djcbsoftware.nl/code/mu/mu4e.html)).
Using mbsync / isync this problem has also been solved - my mails are
local and remote.
## The browser
While you can make a joke about emacs consuming all my memory (it
2019-11-18 11:29:50 +00:00
stands for [Eight Megabytes And Constantly
Swapping](https://www.gnu.org/fun/jokes/gnuemacs.acro.exp.html),
2019-11-18 11:23:34 +00:00
doesn't it?), the real problem are actually browsers. It was a problem
on my 256MB RAM notebook in 1998 with Netscape Navigator, it is still
a problem with firefox and chromium and 16GB RAM in 2019.
Even if you are crazy and upgrade to a 32GB RAM notebook, like I did,
you finally become CPU bound! Yes, indeed, the tabs of my browser
consume all CPU cores - while it is idling.
2019-11-18 11:29:50 +00:00
There is an important discussion around why browsers use
so many resources and how to optimise this, however this is not the
focus of this post...
2019-11-18 11:23:34 +00:00
## The browser in the cloud
Working at [ungleich](https://ungleich.ch), literally less than
50 meters away from the [Data Center
Light](https://datacenterlight.ch), I was wondering whether or not I
can actually use one of our VMs to outsource my browser.
First check: does it make sense? I use the browser, to browse the web
and it is rarely of use in an offline scenario. So it is a possible
candidate for moving out of my notebook.
Second check: how would I access it? I potentially want to be able to
access it from anywhere, even without my notebook. Luckily we have
recently gained some knowledge about
[Apache Guacamole](https://guacamole.apache.org/), which lets me
access VNC, RDP and even SSH via the web. Guacamole also supports 2FA,
which is a nice add-on.
2019-11-18 11:29:50 +00:00
Sanity check: So... I can *use a browser to access my browser*
2019-11-18 11:23:34 +00:00
in the cloud. Does that actually make sense? And the answer for me is
2019-11-18 11:29:50 +00:00
yes, because instead of running many tabs, I only have to run 1 tab
2019-11-18 11:23:34 +00:00
locally and can outsource the rest.
## More in the cloud
2019-11-18 11:29:50 +00:00
Actually, what happens behind the scenes is that the VM is running VNC
(we are also experimenting with XRDP), so I have actually full access
to a remote Linux desktop via browser and can even run applications
like libreoffice, blender or gimp remotely.
2019-11-18 11:23:34 +00:00
Because I think it's a cool thing to have, our team at ungleich added
it as an offer to our [Black IPv6 Friday
Crowdfunding](https://swiss-crowdfunder.com/campaigns/black-ipv6-friday?locale=en).
2019-11-18 11:47:32 +00:00
Below you can actually see how it looks like:
![Desktop in the cloud](/u/desktop-small.png)