We decided early on to store all chat history forever so users can come back at any time and have their data available on any device. This is actually part of our company culture: build quickly to prove out a product feature, but always with a path to a more robust solution. The problem is that even though this is a small amount of messages it makes it harder to serve this data to the users.

The problem is since these servers usually have under 100 members the rate at which this data is requested is low and unlikely to be in disk cache. We knew that in the coming year we would add even more ways for users to issue random reads: the ability to view your mentions for the last 30 days then jump to that point in history, viewing plus jumping to pinned messages, and full-text search.

Automatic failover — We love sleeping at night and build Discord to self heal as much as possible. Writing thousands of messages per second would not work great if we had to constantly deserialize blobs and append to them. Open source — We believe in controlling our own destiny and don’t want to depend on a third party company.

Related data is stored contiguously on disk providing minimum seeks and easy distribution around the cluster. The first K is the partition key and is used to determine which node the data lives on and where it is found on disk. This meant that when loading a channel we could tell Cassandra exactly where to range scan for messages. While Cassandra has schemas not unlike a relational database, they are cheap to alter and do not impose any temporary performance impact.

When we started importing existing messages into Cassandra we immediately began to see warnings in the logs telling us that partitions were found over 100MB in size. Large partitions put a lot of GC pressure on Cassandra during compaction, cluster expansion, and more.

We looked at the largest channels on Discord and determined if we stored about 10 days of messages within a bucket that we could comfortably stay under 100MB. The downside of this method is that rarely active Discords will have to query multiple buckets to collect enough messages over time.

In practice this has proved to be fine because for active Discords enough messages are usually found in the first partition and they are the majority. Introducing a new system into production is always scary so it’s a good idea to try to test it without impacting users. Immediately after launching we started getting errors in our bug tracker telling us that author_id was null. Cassandra is an AP database which means it trades strong consistency for availability which is something we wanted.

Setting up a bot application

Setting up a bot application

Enter a name and confirm the pop-up window by clicking the "Create" button. Once you've saved your changes, move on by selecting the "Bot" tab in the left pane.

Congratulations, you're now the proud owner of a shiny new Discord bot! In this panel, you can give your bot a snazzy avatar, set its username, and make it public or private.

You can access your token in this panel as well, either by revealing it or pressing the "Copy" button. Don't worry if you do happen to lose it at some point; you can always come back to this page and copy it again.

If someone does manage to get a hold of your token, they can use your bot as if it were theirs—this means they can perform malicious acts with it. Let's imagine that you have a bot on over 1,000 servers, and it took you many, many months of coding and patience to get it on that amount.

Discord app safety – What parents need to know

Discord app safety – What parents need to know

Launched in 2015, Discord is a platform for people with similar interests to share and communicate. However, since then, it has grown into a full social network with a wide range of ways to interact with over 140 million* active monthly users. These are set up with a particular focus or emphasis as a way for people to congregate, discuss and exchange images, links and information.

They can also provide strict guidelines for filtering out explicit content and ensuring their moderators’ accounts are secure. However, Discord “updated its age rating to 17+ at Apple’s request.” Their website states they want to “help ensure minors are not exposed to content inappropriate for them.” However, we found that under-17s can still register and use the platform. Discord’s latest Transparency Report reveals that 32.8% of users were subject to harassment on the platform, 11% were victims of cybercrime followed by 8.1% of graphic content, which encompasses content previously marked as “Not Safe for Work” (NSFW).

use of artificial intelligence (AI) to detect abuse, scams, and phishing. It can be a really powerful way for children of an appropriate age to discover other people with similar interests and build a community.

It can also give you an opportunity to equip them with the tools to deal with any risky situations that they may face online. Please note: You can also use certain privacy and security tools on your mobile device or computer to further limit interactions and location-based information.

Anyone that opens the channel will see a warning message letting them know that it might contain graphic content and asking them to confirm that they are over 18. The conversations in Discord are private to the group so it’s less open and visible than other social networks. It is a beneficial way to connect with other people if they are the right age to use it and have the proper support and context from parents and carers.

Related Posts

Leave a reply