Upgrade to Pro — share decks privately, control downloads, hide ads and more …

FrOSCon 2017 talk about vutuv

FrOSCon 2017 talk about vutuv

The talk was about some of the business and technical challenges (e.g. WebPerformance) creating and hosting https://www.vutuv.de . https://programm.froscon.de/2017/events/1960.html

Stefan Wintermeyer

August 19, 2017
Tweet

More Decks by Stefan Wintermeyer

Other Decks in Technology

Transcript

  1. Nobody likes LinkedIn or XING. Too many annoying emails and

    pop-ups. Nobody likes to pay for premium accounts. But those are First World problems!
  2. LinkedIn and XING only work well 
 in a few

    countries (but still slow).
  3. The majority of potential business networking users use low bandwidth

    feature phones which don’t support JavaScript. They have no access to LinkedIn at all. 
 And they can’t pay for a premium account.
  4. Some users need extra security. Not just HTTPS but Tor.

    Think oppressive governments and companies which use proxies to sniff if their employees hunt for new jobs.
  5. Unique Selling Points • vutuv accounts are free.
 Revenue is

    generated with ads and human resources features. • vutuv is available.
 LinkedIn can’t be used in most parts of the world. vutuv is part of internet.org and can cover the whole world. • vutuv is fast.
 3-8 times faster than LinkedIn. • vutuv is secure.
 Your boss or government can’t see if you are hunting for a new job. Not just https but Tor.
 Bonus: We don’t store passwords. We don’t use cookies for non logged in users. • vutuv profiles have a better Google ranking
 Because of the side’s speed an average profile gets a better Google ranking.
 For many users it’s there first business networking account at all which results in unique content.
  6. Traction Number of accounts 0 250.000 500.000 750.000 1.000.000 Nov.

    2016 Dec. 2016 Jan. 2017 Feb. 2017 Mar. 2017 Apr. 2017 April: > 5.000.000 unique visitors per month
  7. No, I did not get any VC money.
 
 By

    now I have given up on it and don’t search for investors any more.
  8. Technology Today • Phoenix Framework
 Runs on the Erlang-BEAM like

    WhatsApp. • MySQL • No JavaScript
 Runs on all devises! Source-Code: https://github.com/vutuv/vutuv/
  9. Jakob Nielsen’s book „Usability Engineering“ from 1993 Delay User reaction

    0 - 100 ms Instant 100 - 300 ms Feels sluggish 300 - 1000 ms Machine is working… 1 s+ Mental context switch 10 s+ I’ll come back later…
  10. Web Search Delay Experiment Type of Delay Delay (ms) Duration

    (weeks) Impact on Avg. Daily Searches Pre-header 100 4 -0.20 % Pre-header 200 6 -0.59% Post-header 400 6 0.59% Post-ads 200 4 0.30% Source: https://www.igvita.com/slides/2012/webperf-crash-course.pdf
  11. Download a 58 kB file from a US east cost

    server to a client in Frankfurt. Protocol: HTTP Roundtrip Time: 80 ms Zeit client server 0 ms SYN --> <-- SYN,ACK 80 ms ACK --> GET --> <-- 10 TCP Segmente (14.600 Bytes) 160 ms ACK --> <-- 20 TCP Segmente (29.200 Bytes) 240 ms ACK --> <-- 40 TCP Segmente (15.592 Bytes) 320 ms ACK --> Time to download a 58 kB file: 320 ms
  12. TCP Slow-Start KB 0 55 110 165 220 Roundtrip 1.

    2. 3. 4. 213 99 42 14 114 57 28 14
  13. HTTPS KB 0 50 100 150 200 Roundtrip 1. 2.

    3. 4. 199 85 28 0 114 57 28 14 SSL
  14. Above the fold target: 28 KB KB 0 50 100

    150 200 Roundtrip 1. 2. 3. 4. 199 85 28 0 114 57 28 14 SSL
  15. Set a time budget and stick to it! Our time

    budget is 1 second within Germany.
  16. What we can control: • Transfer Protocol (e.g. HTTP/1.1 vs.

    HTTP/2.0) • Compression (e.g. gzip vs. zopfli vs. brotli) • Amount of files • File size • Time the server needs to generate the HTML • Content (e.g. HTML, CSS, JavaScript, Images)
  17. Phoenix is about 
 10 times faster 
 than Ruby

    on Rails. Yes, I did a proof of concept of vutuv with Ruby on Rails.
  18. But just a fast programming language is not good enough!

    Remember: We have to run vutuv.de on a dime.
  19. NGINX is our gatekeeper. It checks for cookies and routes

    accordingly. I did think of Varnish but hard drive is cheaper than RAM.
  20. /var/www/vutuv/ cache - index.html - index.html.gz users - xyz.html -

    xyz.html.gz No Cookie = Static Content Cross-Site Request Forgery (CSRF)
  21. guetzli -quality 75 a.jpg /tmp/q75-a.jpg convert a.jpg /tmp/q75-a.jpg -fx 'hypot(65-i,

    65-j) < 65 ? u : v' new_a.jpg https://github.com/google/guetzli
  22. By that we save 15-20% of file size. We use

    https://github.com/stavro/arc for uploading and initial conversion and optimize during off peak times.
  23. /var/www/vutuv/ cache - index.html - index.html.gz users - xyz.html -

    xyz.html.gz Provide a compressed version of a static file.
  24. Fill the Steps KB 0 50 100 150 200 Roundtrip

    1. 2. 3. 4. 199 85 28 0 114 57 28 14 SSL
  25. Analyse your workflow and prefetch stuff that you’ll need in

    the next step. <head> […] <%= if @conn.assigns[:prefetch] do %> <link rel="prefetch" title="a" href="a.jpg"> <% end %> </head>
  26. Obviously money is the biggest problem. Because we don’t use

    JavaScript we can’t use the classic Google Ads system to earn money. And charging for accounts is a no go either.
  27. Potential Future Technology • Phoenix Framework
 Runs on the Erlang-BEAM

    like WhatsApp. • CouchDB
 Syncs over continents. Super fast anywhere. • No JavaScript
 Runs on all devises! • Cheap servers
 The world is our data center (blue dots). We are not affected by catastrophes. DNS will reroute to other continents. • Short distance to the browser
 This ensures the best browsing experience.