← Back home

Here's What LBRY Did in April and May

10 June, 2020 - 7 min read

The last two months have been a wild ride for us.

We hit a record number of users in March (1M), April (2.5M), and May (3M). The incredible increase in users kept us focused squarely on improving performance in every area, though we did manage to squeeze in some feature requests too.

Scaling Up lbry.tv

In March we told you about our move to Kubernetes. It couldn't have come at a more opportune time. As traffic exploded to lbry.tv, adding capacity was fast and painless. Even when the website struggled, it was rarely due to cluster scaling limitations.

A big limitation we did have to overcome was moving data from the network to lbry.tv users. Thankfully this is a very Web 2.0 problem, and the solutions are well-known: caching and CDN-ization. We split the lbry.tv video player into a separate service that's distributed across different parts of the world. Each region has dedicated servers that cache content locally and serve it to nearby users (through GeoDNS). The extra players were especially helpful in Europe and Asia.

Our next bottleneck in terms of scaling is the SDK. It was originally intended to serve a single user, and we press-ganged it into service for lbry.tv. Right now we're running several dozen SDKs in rotation, spreading the load across them. At the same time, we're doing a major rewrite of the code to add support for the multi-user use case. As one example, the SDK currently uses sqlite - a great database for single-process apps (like running the SDK on your own computer) but not a good fit for 10K concurrent users. So we're adding the flexibility to choose Postgres instead of sqlite.

We'll be rolling out the new SDK a little at a time as we finish implementing each API, following the Move Fast, Break Nothing strategy . Expect to see improvements as soon as next week.

Native Android App - Way Faster Than Before

Our biggest single improvement is a huge boost to the Android app. The app was originally written with React Native, which let us reuse the code that runs the desktop and web apps. This worked well at first, but we discovered that the UI would sometimes become unresponsive. The root cause was that RN did not let us run long-running functions in the background because it ran all of Javascript in a single thread.

Akinwale (@akinwaleatlbry) decided the best way forward was to drop React Native and rewrite the app in Java. Two months and 40,000 lines of code later, the native app is live in the Play Store (and coming to F-droid soon thanks to the LBRY dev community). It's wicked fast and includes shiny upgrades like background play, picture-in-picture, and better video encoding when publishing from your phone. Give it a try!

Password Login

One of our most-requested features for lbry.tv was for the option to use a password to log in. Previously we would send you an email with a link to click that logs you into the app. Now you can enter a password instead. Many people prefer a password to the email link because it plays nicely with their password manager and it's faster than switching tabs and waiting for the email to arrive. One of our values at LBRY is personal choice, so now you can choose how you want to log in.

The main reason we didn't have passwords to begin with is that they introduce a whole mess of security issues: weak passwords, password reuse, losing or forgetting your password, and so on. While password managers solve many of these problems, we felt it was best to avoid them altogether for as long as possible. When we finally went to add passwords, we wanted to do it as securely as possible. As a result, we check your password against a known database of leaked passwords when you register to help users choose a strong password.

Community Contributions

Open source is magical. Anyone on the Internet can find your work, use it, get excited about it, and add their own improvements. We've been feeling a lot of that magic lately. I wanted to take a moment to express my gratitude and highlight some work from the wider LBRY community that caught my eye.

F-Droid

kekkyojin on Github is working on a PR to get the android app into the F-Droid open source app repository. He started this as part of our push to increase privacy and disconnect from Google. If you're curious or have experience with F-Droid, consider popping in and taking a look.

Chrome Extension

Many of you know @Madiator2011 from his long history of contributions to LBRY. His latest is a Chrome extension that lets you watch YouTube videos on LBRY. As you browse YouTube, the extension automatically checks if that video is on LBRY and offers to redirect you there. Check it out, and drop by our Discord to thank him or find out what he's working on next.

Community PRs

Across all our repos, we closed 668 issues and merged 403 PRs over the last two months. Thank you everyone who helped out - Coolguy3289, HarshKhandeparkar, SleepingFox88, StripedMonkey, TigerxWood, acu192, andybeletsky, btzr-io, cassidypignatello, ceoger, clay53, eatdostacos, endes123321, eukreign, evanmccarter, finer9, half-duplex, hibyemy, infinite-persistence, jackrobison, jeffslofish, jessopb, jsigwart, kauffj, kcseb, keikari, lbry-joko, littlemadhatter, lpessin, lyoshenka, madmaxgrey, mbrixius, nikooo777, osilkin98, seanyesmunt, shyba, sighmanjestah, thebubbleindex, tiger5226, tzarebczan, and ykris45.

For an even more salient example, look at latest app changelog to see just how much of an impact these contributions are having. More than half of the changes have a community pr! label on them, meaning that someone outside LBRY Inc. gave their time to improve your LBRY experience.

If you'd like to contribute but you don't know where to start, the desktop app team has an quick intro for you. For other repos, look for issues tagged help wanted for a curated list of ways to help.

Other Updates

LBRY-First Publishing

This one's really big for creators who want a safe way to see what it's like to ditch YouTube for good. Now you can publish your videos straight to LBRY, and we'll republish them to YouTube for you. We're rolling this out to just a few people at first. Email hello@lbry.com if you want a sneak peek.

Paid Content on lbry.tv

We believe in shipping fast and iterating, so lbry.tv supported only free content at first. Not anymore. Now you can buy and watch paid content over the web.

Buy LBC on lbry.tv and in the app

Need some LBC for that paid content? Now you can buy it directly! (non-US only, for now 😞)

Goodbye Google Analytics

We've switched to Matomo, the open-source alternative that won't sell your data or use it to show you ads.

App Upgrades

Three big app releases packed with new features: video embeds in markdown posts, a new creator analytics dashboard, revamped content pages, ... too many to list here. Check the changelogs:

Working on Something Cool?

Show it off! Comment below with a link to your stuff. Even if its not LBRY-related, I'm curious what you're hacking on. Sharing is caring :-)