SSH and SSL: What’s the Difference for Security Sake?

When it comes to security online, you want to feel good about sending information across the web. SSH and SSL are here to help keep your information secure. So, what’s the difference between the two?

It might be easy to confuse them. They both consist of three letters, they both start with two ‘Ss’, and they help keep vital information secure (and more).

But, yes, they are different and your confusion will soon end.

In this article, I’ll be going over all things SSH and SSL.

The areas we’ll cover are:

  • What is SSH?
  • What is SSL?
  • How TLS plays a part
  • The importance of each one
  • Why we use it
  • The authentication process
  • All about encryption
  • Setting up SSH and SSL in The Hub
  • Similarities and differences between them

And more!

Dev Man SSH and SSL
By the time you’ve read this, confusion will end and all will be revealed.

To get started, it’s important to know what SSH and SSL are. So…

What is SSH?

SSH (secure shell) is a way to communicate with a remote computer securely. It’s used for executing commands remotely.

So, for example, if you’re on vacation in the Bahamas, you can access your work website remotely, perform commands, and edit (although, why would you do this on such a great vacation?).

It does this by interacting with another system’s operating shell and functions by using public-key cryptography for connection and authentication.

This makes gaining access to a WordPress site possible in a secure way to ensure nobody has access to your connection while you’re on it.

What’s the Importance of It?

It’s important because it secures all of the unsecured networks in the client and server connection.

The client uses the remote host information to initiate a connection, and, when the credentials are verified, it establishes the encrypted connection.

On the server-side, there’s an SSH daemon that’s regularly listening to a specific TCP/IP port for a potential client connection request.

When a client initiates a connection, the SSH daemon will get back to it and reply with the software and the protocol versions it supports.

The two exchange their identification data and (if the credentials pan out) create a new session for the appropriate environment.

Why Do We Use It?

People use SSH to securely communicate with another computer. By using it, the exchange of data is encrypted through the internet pathways.

This ensures that anyone who might see the data, who isn’t supposed to, would not be able to see what was in the data.

With SSH, you can then access sites and use commands to perform various functions (e.g. add a new file from the Bahamas).

The Key(s) to the Authentication Process

The authentication is pretty straightforward and simple.

It starts with creating a key pair, which the user typically does with ssh-keygen. Private keys stick with the user, while the public key goes to the server.

A server stores the public key and marks it as authorized. From this point, a server will now allow access to anyone who can show proof that they have the corresponding private key.

The private key is typically kept private by a user developing a passphrase for it.

Then, when a private key is needed, the user has to supply the passphrase so that the private key can be decrypted.

how ssh works.
How SSH works.

Setting up SSH in the Hub

If you’re new to WPMU DEV or do not have an account with us, The Hub is where you can manage, update, monitor, scan, and manage WordPress sites, all in one place.

It’s where you can allow SSH authentication, too.

In this example, I’m going to show you how to get SSH quickly set up in our Hub 2.0.

Then, I’ll provide a link to an article of ours that has a ton of very useful and detailed information that shows how to login to a cloud server, generate a public and private key pair, commands, and everything you need to know for SSH.

Note: If you are not hosting with us, your hosting service should have an admin section where you can upload the public key.

Every hosting service is a bit different, so you may need to reach out to them for assistance.

Ok, back to The Hub…

When you’re logged into the Hub, select your website and then click on the Hosting tab.

The Hub hosting tab.
Where the hosting tab is in the Hub.

Once you click the Hosting tab, more options will appear.

From this point, click on the SFTP/SSH tab.

STFP/SSH tab.

This takes you to a screen where you can view your SFTP/SSH Accounts and Users.

All the SSH accounts and users.
All your SSH accounts and users.

For this post, we’re interested in SSH. For a detailed tutorial on using SFTP, see this post on using SFTP to transfer your files securely.

Setting up a new user with an SSH account is quick and easy to do.

First, click on Add User.

Add a new SSH user.
Add a new SSH user.

This will give you two options: SFTP User or SSH User.

SSH user.
We’ll go with SSH…

Clicking on SSH User will take you to an area where you fill out specific information for a new user.

New SSH user setup.

Create a Username and Password (or use the funky password we’ll automatically generate for you).

Next up is Path Restriction. If you like, you can limit the user’s access to your entire wp-content directory, or just to your Plugins, Themes, and Uploads folder.

If you want no restrictions, just keep it on the default of None.

You can also choose the Environment (i.e. Production or Staging).

When you have all of the necessary information inputted, click the blue Add button.

That’s it!

The new user will now appear in the dashboard. He or she will use the information to log into SSH to work on your site with commands and more.

You can edit the user, password, restrictions, and environment for any user at any time.

There’s a ton you can do with SSH and it’s easy to get started. For more detailed information, please check out our article all about SSH.

And now that you know about SSH…

What is SSL?

You may not be aware of this, but you’re probably already familiar with it.

For example, have you ever logged into your checking account or another website (e.g. one about Bahama vacations) and noticed it starts with “https://” instead of just “http”? There’s an “s”. Hmm…

Or, for an even quicker example, check out the lock to this post here on WPMU DEV from my browser.

You’ll notice in the address bar, we have a lock before our URL. I told you that you were already familiar with it ;)

SSL lock on browser.
Look familiar?

SSL (secure socket layer) is the standard security technology for establishing an encrypted link between a server and a browser.

This link ensures that all data that is passed between the web server and browser stay private.

When you visit a website that has a form and you fill out your information, SSL helps keep it secured. If you did this on an unsecured website, that information could be intercepted by (yikes) hackers.

It’s often used for user account pages, online checkout, and any site where important or sensitive information is used.

With SSL, your browser will form a connection with the server, look around for an SSL certificate, and then connect together with your browser and the server.

The connection is secure so that only you and the site that you submitted the information can access or see what you input in your browser.

The connection is instant and is typically faster than an unsecured website. If you have a website with SSL, you’ll score much better with SEO as well as security.

Why Do We Use It?

Simply put…to stay secure!

It’s important that information doesn’t get into the wrong hands and you feel at ease when transmitting personal information online.

Otherwise, some crook might take that money you were going to use on vacation and go on one himself.

What’s the Importance of It?

It’s important to keep information safe when online.

With SSL, sensitive information is sent across the Internet encrypted. That means only the intended receiver can access it.

Also, an SSL certificate provides authentication. This ensures that you’re sending the information to the right place and not some hacker who is trying to swipe your information.

SSL providers are important to help verify a company. They use several identity checks to make certain that the website is who they say they are.

Authentication Process

A browser or a server will attempt to connect to a website with SSL. The browser then asks (requests) that the web server identifies itself.

The web server will then send the browser (or server) a copy of its SSL certificate.

The browser checks it out to make sure it can trust it. If it can, it sends a message to the webserver.

From here, the webserver sends back an acknowledgment that’s digitally signed. This starts an SSL encrypted session.

Data between the browser/server and the secure SSL server is shared securely because it’s encrypted.

How SSL works.
How SSL works.

Getting Set Up in the Hub

This is extremely easy to set up because, well, it’s already done for you!

All websites that are hosted with WPMU DEV are provided with SSL certificates.

Considering how unsafe unsecured sites are, it’s essential for us to provide members with this automatically.

You can see the SSL status of your site by clicking on your website’s URL, then Hosting>Domains.

Where you can see your SSL status.
Where you can see your SSL status.

It will have a green checkmark underneath SSL status if all is running well.

Keep in mind that when you add a site, it may take several minutes for a certificate to be ready.

Sometimes the process can take hours or, in very rare cases, an entire day. It just depends on how fast your DNS settings propagate.

Our SSL certificates come from Let’s Encrypt. It’s totally free for you and we renew them every three months.

Custom SSL Certificates

Adding a custom SSL is an option for you as well with our hosting.

The first thing you’ll need to do is submit a Certificate Signing Request (CSR) to a Certificate Authority. Certificate providers (e.g. CSR Generator) usually have tools or can assist you in generating the CSR.

When you obtain the CSR, it’s important to save a copy of the Private Key.

Now, you’ll use the CSR to purchase the SSL certificate. This will give you a Private Key, Certificate, and Certificate Chain.

Your SSL provider should be able to provide you with this information if they create a CSR with their interface.

Keep in mind, you can use wildcard SSL certificates, too.

Our team can upload those for you exactly like non-wildcard certificates.

Also, our support staff can help with adding custom certificates. You can start a live chat or create a support ticket. Either way, we’ll get you all set up.

To learn more about SSL, be sure to check out our article How to Use SSL and HTTPS with WordPress.

A Little Bit on TLS…

Whenever you see SSL being mentioned, you’ll often see TLS, too.

So, what’s TLS?

TLS (Transport Layer Security) is a vastly adopted security protocol that is designed to facilitate privacy and data security over the Internet.

It encrypts the information that is being communicated between web applications and servers (e.g. web browsers loading a website).

TLS actually evolved from SSL, therefore you often see the name SSL/TLS used interchangeably. TLS is basically an upgraded version of SSL. However, there are a few minor distinctions.

Here are five of them:

  1. Alerts: TLS protocol is to remove the alert message. It replaces it with several other alert messages. Meanwhile, SSL has a No Certificate alert message.
  2. Cipher Suites: TLS doesn’t offer any support for Fortezza cipher suite, however, SSL does. TLS follows an improved standardization process that helps make defining of new cipher suites simpler (e.g. RC4).
  3. Handshake: With SSL, the hash calculation additionally encompasses the master secret and pad. With TLS, the hashes are calculated over the handshake message.
  4. Record Protocol: TLS uses HMAC, which is a hash-based message authentication code. It’s used after each message encryption. SSL uses Message Authentication Code (MAC) after encrypting each message.
  5. Message Authentication: TLS depends on HMAC Hash-based Message Authentication Code while SSL authenticates by adjoining the key details and application data in an ad-hoc way.

As you can see, they’re different but are also very similar in nature.

You also now know why you often see SSH/TLS together. TLS fixes some of the security vulnerabilities in the earlier SSL protocols.

Something to remember is that your certificate is not exactly the same as the protocol that your server will use. That means you do not need to change your certificate to use TLS.

Sure, it may be labeled as an SSL certificate, but your certificate already supports both the SSL and TLS protocols.

If you’d like to check out what version of SSL/TLS your web browser is using, you can cruise over to the How’s My SSL tool. It’ll show you instantly.

TLS is probably going to become more and more common of a term than SSL soon, so get used to it.

Differences Between SSH and SSL/TLS

Now that we’ve looked at SSH and SSL/TLS — what are the similarities and differences?

I’ve gone over how they function and what they do, however, the big takeaway is they both use encryption to protect data that is being passed between two network devices.

Here’s a quick breakdown of some of the essential differences between the two:

SSH vs SSL/TLS
SSH vs SSL/TLS

While we are comparing security protocols and acronyms that start with “s,” the other protocol you should know about is when to use SSH vs SFTP.

This is important if you plan to access files on your hosting server securely. Fortunately, we have written an entire article about it here: What is SFTP? How to Transfer Your Files Securely.

Feel Secure Yet?

Security has many layers and differences, as you can see. A strong password isn’t the only thing that’s going to protect you.

Both SSH and SSL have their unique purposes and do what they can to help.

SSL is the primary requisite of security on the web, SSH is an added safety feature of it. When you add TLS into the mix, all three of them render strong and mighty security and safer communication in the web hosting process.

SSH does have some additional features, such as providing multiple data channels to its applications.

It supports the execution of remote programming, TCP connections, and more, which makes it often used by web hosting companies as the sole security protocol.

However, when implemented correctly, they all work well to help keep your information secure.

Throw some good hosting and take other measures (e.g. install our Defender plugin), and you’ll have a knockout system of security for the web.

And now the big difference between SSH and SSL is you’re no longer confused by them.

Apply to Speak at the JavaScript for WordPress Conference

The third annual JavaScript for WordPress Conference is gearing up for three days of online talks and workshops on July 8-10, 2020. The event is free to attend and organizer Zac Gordon is working to put together a diverse speaker lineup.

Day 1 will be devoted to workshops that help beginners get up and running with JavaScript and React. Day 2 will focus on building Gutenberg blocks and block-based themes. Day 3 will include topics and projects that use WordPress as a Headless CMS.

“Last year we did 4 tracks all at once.” Gordon said. “That was a lot. So this year we’re doing two days, one track each day. We decided on Blocks and Headless as our two tracks, because that seems to be where most of the JavaScript development is happening at the moment in the WordPress space.”

Previous editions of the conference have pulled in approximately 1,000 viewers, similar to the size of a large WordCamp. Gordon said the event is open for all JavaScript-related topics related to WordPress beyond Gutenberg and headless setups and they are trying to encourage new speakers.

“Each year we’re trying to do more to have the conference reflect a range of speakers, and this year we’re hoping that a few of the brilliant and industrious younger folks coding or building with WordPress might speak,” he said.

Registration is free on the event website and applications for speakers will be open until June 1.

“I’m not sure how many speakers we will do exactly, but we will have a few folks leading workshops day one and then maybe 5-8 speakers the two other days,” Gordon said. “It will be fewer speakers than last year, but hopefully still a lot of quality focused talks. The applications we’ve seen come in so far are exciting.”

Static Hoisting

The other day in “Static or not?” I said:

[…] serving HTML from a CDN is some feat.

What I meant is that serving resources like images, CSS, and JavaScript from a CDN is fairly straightforward. The industry at large has been doing that for many years. An asset with a URL can be moved to a CDN and served from it. Changes to that asset are usually handled by changing the URL (e.g. style.324535.css, style.css?v=345434 or the like) so that we can take full advantage of browser cache. But HTML is a little different. The URLs to our HTML are the URLs of our public-facing websites and those URLs don’t change.

Historically, we’ve said “oh well” to this. Our web servers will serve our HTML and we’ll just do the best we can with performance there. But the Jamstack approach is changing that by saying, actually, we’ll serve that HTML from a CDN as well.

Guillermo Rauch calls that “hoisting” and likens it to how JavaScript hoists declarations higher in code. Jamstack hoists static assets higher in the hosting stack.

What Jamstack as a software architecture has now made possible, however, is to hoisting the results of computation to the edge, right next to where your visitors are.

A core tenet of Jamstack has been to pre-render (pre-compute) as much as possible, which has given prominence to static site generation. The key idea is that computation that would have happened later on, in the request’s timeline, has now been shifted to the build phase, performed once and made available for all users to share.

Hoisting, notably, happens automatically. What can be hoisted will be hoisted. But things that need servers to run (e.g. cloud functions and API stuff) can still do that. Getting even more complex, in our talk with Brian Leroux, Dave and I got into how even the results of cloud function execution can be put on a CDN and cached.

Direct Link to ArticlePermalink

The post Static Hoisting appeared first on CSS-Tricks.

IoT and Node.JS: How to Catch the Opportunity?

In 2019, the market revenue of IoT reached $ 212 billion. There are about 26.66 billion connected IoT devices worldwide, and this number is to reach 75.44 billion by 2025. The UN estimates that, in May 2020, the world population is 7.78 billion people. A simple math operation tells us that an average person owns from 3 to 4 IoT devices. Do you have one? Maybe a smartwatch? A smart TV? Or a smart car?

Moving further, the population is expected to reach 8.1 billion people in 2025. The same math calculation shows us that, in 2025, an average person will have from 9 to 10 smart devices in their possession. Do you see where I am leading you to? Do you want to join this prosperous market niche and make your IoT device to be one of these 9 to 10?

The Ultimate Guide to Shift-left Testing

Introduction

In today's competitive era, the demand to deliver quality software products in a cost and time-effective manner continues to accelerate. To accommodate that need, more and more companies are now incorporating shift-left testing to their product development processes. To help you better understand this methodology, in this article, we will delve into the basic tenets of shift-left testing, its benefits, and how to measure success.

What is Shift-Left Testing?

Shift-left testing comes about to test earlier in the development process. Even with Agile teams breaking away from the traditional Waterfall development model, testing always seems to be the last step.

Monetate Launches SDK for React Mobile JavaScript Framework

Monetate, a Kibo company and provider of omnichannel personalization, today announced it has released a new Software Development Kit (SDK) for the React Mobile JavaScript framework. This new offering gives customers a streamlined method to leverage Monetate’s platform capabilities on the React framework for single-page applications (SPAs) as they would for traditional multi-page applications.

Forward and Back-Propagation Programming Technique/Steps to Train an Artificial Neural Net

This write-up is especially for those who want to try their hands at coding an Artificial Neural Net. How it is done mathematically doesn’t need an explanation from someone like me who is a programmer and not a scientist or a researcher. There are numerous training videos that you can go through and learn. I have gone through Prof Patrick Winston’s class as part of MIT OpenCourseWare and understood how the feed-forward and back-propagation technique works.

Through this article, I will explain the steps that you will need to follow to build a fully configurable ANN program (with N number of input features, N number of hidden layers, N number of neurons in each hidden layer, N number of output neurons). I would encourage to write your own custom program following the steps. As long as we adhere to the best practices of programming, test its efficiency, performance, we are good to go.

ACF Blocks Provides Assortment of Blocks Built from Advanced Custom Fields Pro

Over the weekend, Munir Kamal released version 2.0 of his ACF Blocks plugin, a project that creates a suite of blocks for the editor. The plugin offers 18 custom blocks in its free version and 15 more in the pro upgrade. It is built on top of Advanced Custom Fields Pro (ACF Pro).

The latest update of the plugin added support for typography, including options for using various Google Fonts for in-block text. Kamal also included base styling options for design features like margin and padding for every block in the plugin.

With ACF Pro as a hard dependency, it limits the audience of ACF Blocks. In large part, this plugin will be useful for agencies and freelancers who need to quickly build features for clients within their budget. For that purpose, the plugin does a solid job.

The tight coupling with ACF Pro hurts the user experience for the plugin. However, the ideas behind ACF Blocks and its custom options make up for the shortcomings of relying on its dependent parent plugin. Decoupling the two is unlikely, but it would make for a smoother experience and open the plugin to a wider audience.

Kamal took inspiration for the plugin from ACF and its pro version. He described the process of building blocks with the framework “super easy,” even for an intermediate-level developer. “It has been such an amazing WordPress framework for years to create custom fields,” he said. “And when [Elliot Condon] announced the block creation feature in ACF, that quickly triggered me to build this collection of ready-to-use ACF Blocks.”

The biggest technical limitation is that Kamal cannot build nested blocks, which is a current limitation of ACF. “I have already discussed it with [Condon], and he is already working on bringing that functionality hopefully soon,” he said. “Once that comes to ACF, we may create more amazing and powerful Gutenberg Blocks.”

Watch a short walkthrough of how the plugin works:

Useful Assortment of Blocks

While primarily testing the free version of ACF Blocks, I found that it has several useful blocks that could immediately address common needs for end-users. With 18 free blocks available, users have plenty to work with before deciding whether they want to move along the upgrade path to the pro version.

One of the best blocks in the collection is the Photo Collage block. It is ACF Blocks’ answer to the core Gallery block. The grid options for this block alone make this plugin worth checking out. The block offers between 2 and 15 grid layouts, depending on the grid option the user selects.

Screenshot of the Photo Collage block from the ACF Blocks plugin in the WordPress editor.
Setting the grid for the Photo Collage block.

My second favorite of the assortment is the Testimonial block. Coupled with the typography options, which are available for all blocks, you can have a lot of fun designing a testimonial section.

Screenshot of the Testimonial block from the ACF Blocks plugin in the WordPress editor.
Tinkering with Google Fonts in the Testimonial block.

This is a small sampling of what the plugin can do. The Price List block can help restaurant sites set up their menu. The Pricing Box block, particularly when nested into the core Columns block, makes it easy to set up a pricing section with multiple product options. And, the Team block makes it simple to create profile sections on a company’s team/about page.

The following blocks are available in the free version (with several more in the pro version):

  1. Scrollable Image Block
  2. Tab Block
  3. Toggle Block
  4. Accordion Block
  5. Image Slider Block
  6. Social Sharing Block
  7. Photo Collage Block
  8. Posts Block
  9. Testimonial Block
  10. Team Block
  11. Multi Buttons Block
  12. Pricing Box Block
  13. Price List Block
  14. Start Rating Block
  15. Progress Bar Block
  16. Counter Number Block
  17. Click to tweet Block
  18. Business Hours Block

Kamal’s favorite blocks from the overall suite are Image Hotspot, which allows users to set an image background with “pointers” to pop up content; Before After Image, which lets users compare two images using a sliding bar; and Photo Collage, the plugin’s grid-based gallery block. The first two are available only in the pro version of the plugin. The plugin creator said he thinks all the blocks are useful but these were the most fun to build.

Room for Improvement

ACF Blocks is a nice concept. It gets a lot of things right. However, there are minor issues that dampen the experience of working with its blocks. These issues are not insurmountable, and I expect Kamal will address them in upcoming versions based on familiarity with his past work and drive toward building great products for users.

The most immediate issue and likely the simplest to fix is the plugin’s styles for left and right margins on every block. The plugin resets these margins to 0 by default. Depending on the active theme on a site, this could shift the blocks to the edge of the screen instead of the content area on the front end. Some themes use left/right margins to align content. This is not an issue with only ACF Blocks. It is prevalent among plugins with front-end output.

One quick solution for the margin issue is to wrap any of the plugin’s blocks within the core Group block. This will put margins back under the theme’s control.

Editing block content happens in the block options panel instead of directly in the block. I am unsure if this is a limitation of using the ACF Pro framework or a design decision on Kamal’s part. It feels odd to jump between editing content in the content area to editing content in the sidebar.

One example of my confusion with block content was with the Photo Collage block. I clicked on the block, hoping to have the media library appear for uploading. Nothing happened. I clicked again because, well, maybe I did not get a good click in that first time. Nothing happened. I eventually found the image upload button under the block’s option panel on the right.

Setting block options can feel a little sluggish at times with the block output in the editor not reflecting changes immediately. This is primarily because ACF Blocks relies on the server-side rendering capabilities of ACF Pro. It is unlikely this can be addressed in the blocks plugin. Some users may find the delayed rendering to be tedious when editing multiple options.

Final Thoughts

Kamal has put together a useful set of blocks that will help many end-users build sections of content they cannot create out of the box. Between the free and pro versions, there is a total of 33 blocks. The creator is committed to adding more blocks over time based on user feedback. In the immediate future, he plans to keep hacking away at bug fixes and improving the code.

I still feel like how ACF Pro works is a hindrance to how good this plugin could be if built from scratch. With that said, the framework helped make Kamal’s plugin a reality. ACF Blocks is a showcase in what is possible via ACF Pro, which should inspire other developers who are looking for solutions built on top of one of the most widely-used frameworks in the WordPress ecosystem.

Kamal understands that some ACF Pro users may try their hands at creating similar blocks but feels like his team’s knowledge and dedication to offering support are the most important parts of the equation. “ACF Blocks saves time and effort for creating blocks yourself for the most common web design elements,” he said.

Note: this plugin review and feedback were requested by the plugin author. Read our post about honest feedback based on genuine experiences for more information on how reviews are handled.

A Beginner’s Guide to Kotlin

This post will provide you with:

  • A brief overview of Kotlin’s features
  • A guide for solving a basic problem and building a “Hello, World!” app.
  • A brief breakdown on running a Kotlin Spring Boot application with authentication via Okta 

Kotlin is a modern language that is statically typed within the JVM. It’s a multi-purpose, cross-platform, free and open-source language developed by JetBrains under the Apache 2.0 license. Kotlin has constructs for both Object Oriented and Functional programming styles (as well as mixed). It can be used for many types of development; web, server, and client, and mobile—using most Java IDEs.

Will a BLOB Eat All My Memory?

Probably the most common usage for large objects (CLOBs and BLOBs) is to store them in a database table. In this circumstance, it feels intuitive that you won't have a lot of concerns about memory, because the database will simply store those objects in datafiles like it would any other kind of data.

But BLOBs and CLOBs can also be declared as local variables in a PL/SQL block. We typically expect local variables to be housed within the memory for that session (the PGA). There are explicit calls in the DBMS_LOB package to create a temporary large object, but what if we do use that API? What if we just start bludgeoning a local variable with more and more data? Is this a threat to the session memory and potentially the database server?

Graph BFS With Different DS in Adjacency Matrix and Their Usability

This article analyzes the adjacency matrix used for storing node-link information in an array. For a Graph BFS (Breadth-first-search) traversal, we normally tend to keep an adjacency matrix as a 2D array (adj[][]) or array of linkedLists as LinkedList[]. As a result, if an element X is added before element Y, it appears in BFS traversal accordingly. BFS traversal becomes like: ~X,Y,~. What if, the appearance of elements within a breath of a graph needs to be traversed  according to some priority or any rule!!

Say in a breath if Priority of Y > Priority of X, element Y should occur before X in BFS traversal. Say In a breath if Y is added later the X, Y should occur before X in traversal.

3 Ways to Reduce Latency in Multi-Region Deployments

Globally deployed applications don't have to be slow. In this post, we'll show you three ways to reduce latency in multi-region deployments, using a sample app we built called Wikifeedia. Wikifeedia is built on top of the public APIs from Wikipedia. It shows users a globally sorted index of content based on the most reviewed content in each language for the previous day. Since its target audience is global, it needs to be accessible from anywhere in the world, with low latency. But, like many news aggregations, the content isn’t changing from second to second. As such, it can tolerate slightly stale data.

The application is hosted on Google Cloud Kubernetes Engine, while the underlying database is hosted using our own Cockroach Cloud managed service offering. As a side note, this application has become a personal favorite of ours as we find ourselves eagerly checking out Wikifeedia to determine what’s trending on Wikipedia in any given day. 

The Strategy (or Lack Thereof) Around Software Today

Few would argue that, inside an organization, the teams that create software get a lot more respect than they used to.

For years, software was a manufacturing and/or maintenance function that got done out of sight, hidden away in some dark corner of a company. Software delivery was viewed as more of a cost center to be managed than a resource to be leveraged for strategic value. Now, companies rely heavily on the software they produce to perform critical tasks. They expect software to transform their inner operations, to help departments work smarter and improve productivity. Even more importantly, many are betting their companies’ futures on their ability to create innovative, impactful software applications that attract new customers.

Anemic Domain Model in Typical Spring Projects (Part 1)

When I just started my career as a Java developer, I knew only a few basic design patterns. I tried to implement them everywhere, even when I shouldn't have, and I thought that more experienced people use them on a daily basis. With time, I have changed several different teams and companies, but I have never seen real usage of “real” patterns. Of course, I am not talking about Builder, Singleton, or Abstract Fabric, but rather about more complicated and less common ones like Bridge, Observer, etc. Familiar situation, isn’t it?

Basics

For a full understanding of the problem, we should begin with the basics. 

Atomic Replication Changes in etcd/Raft

At Cockroach Labs, we write quite a bit about consensus algorithms. They are a critical component of CockroachDB and we rely on them in the lower layers of our transactional, scalable, distributed key-value store. In fact, large clusters can contain tens of thousands of consensus groups because in CockroachDB, every Range (similar to a shard) is an independent consensus group. Under the hood, we run a large number of instances of Raft (a consensus algorithm), which has come with interesting engineering challenges. This post dives into one that we’ve tackled recently: adding support for atomic replication changes (“Joint Quorums”) to etcd/raft and using them in CockroachDB to improve resilience against region failures.

A replication change is a configuration change of a Range, that is, a change in where the consistent copies of that Range should be stored. Let’s use a standard deployment topology to illustrate this.