What is the most important feature an Express.js application can have? Maybe using sockets for real-time chats or GraphQL instead of REST APIs? Come on, tell me. What’s the most amazing, sexy, and hyped feature you have in your Express.js application?
Want to guess what mine is? Optimal performance with minimal downtime. If your users can’t use your application, what’s the point of fancy features?
In the past four years, I’ve learned that performant Express.js applications need to do four things well:
Where are Docker container logs stored? There’s a short answer, and a long answer. The short answer, that will satisfy your needs in the vast majority of cases, is:
You see, by default, Docker containers emit logs to the
stderr output streams. Containers are stateless, and the logs are stored on the Docker host in JSON files by default.
The default logging driver is json-file.
A logging driver is a mechanism for getting info from your running containers. Here’s a more elaborate explanation from the Docker docs. There are several different log drivers you can use except for the default json-file, like syslog, journald, fluentd, or logagent. …
Have you ever grown tired of running the same
kubectl commands again and again? Well, the good folks over at the Kubernetes team understand you. With the addition of custom resources and the operator pattern, you can now make use of extensions, or addons as I like to call them, to the Kubernetes API that help you manage applications and components.
Operators follow Kubernetes principles including the control loop. The Operator Pattern is set out to help DevOps teams manage a service or set of services by automating repeatable tasks.
This article will show you the pros and cons of using the Operator Pattern versus StatefulSets, as I explained in our previous tutorial about Running and Deploying Elasticsearch on Kubernetes. It will also guide you through installing and running the Elasticsearch Operator on a Kubernetes cluster. I will also explain how to quickly set up basic monitoring with the Sematext Elasticsearch monitoring integration. You can also peek at Kubernetes monitoring integration on your own. …
Big data, AI, machine learning, and numerous others are all buzzwords we seem to throw around lightly in recent years. Even though they are hugely different from one another, they all have one thing in common. Data! Huge amounts of data that needs to be managed.
The downside of that is that the more data you have the more of a headache it is to store, query, and make sense of.
However, running Elasticsearch on Kubernetes can save you a lot of trouble. Elasticsearch handles storing and querying data, while Kubernetes handles the underlying infrastructure. By the end of this tutorial, you will have a running Elasticsearch cluster on Kubernetes, learn best practices to leverage the platforms’ powers, and get some tips about memory requirements and storage. …
Node.js monitoring is a tricky task. There are certain challenges to look out for. Because Node.js is a dynamically typed programming language and single-threaded you give the interpreter and runtime a lot of freedom to make decisions. This can easily result in memory leaks and high CPU loads. Parallel execution is simulated in Node.js by using asynchronous execution of functions. But, if a single function blocks the thread or event queue, the application performance will take a huge hit.
This article will dive into how you can monitor your application and make sure these issues don’t happen. I’ll cover Application Performance Management (APM) and why it’s important, but also Log Management and how you can create structured logs to help you debug, troubleshoot and track errors in your application. …
Don’t you just hate it when APIs are failing and you have absolutely no clue why? Now imagine you don’t have access to the VM, cluster or container where your software is running. Want me to continue with this nightmare?
Yes, that’s what debugging AWS Lambda functions tends to seem like. A horrid nightmare of not knowing what is happening nor why things are failing. This article will show you a way of logging function invocations. …
Not so long ago I started exploring server-side rendered single-page applications. Yeah, try saying that three times fast. Building products for startups has taught me SEO is a must if you want an online presence. But, you also want the performance SPAs can provide.
We want the best of both worlds. The SEO boost server-side rendering provides, and the speed of a Single Page Application. Today I’ll show you all this while hosting it basically for free in a serverless environment on AWS Lambda.
Let’s run through what this tutorial will cover. You can skim through and jump to the section that interest you. Or, be a nerd and keep reading. …
Quite an exciting title, isn’t it? I was hyped when I heard AWS was adding support for custom runtimes and layers for AWS Lambda. This means you can now build your own custom artifacts, enabling you to share and manage common code between functions.
I won’t say I fainted when I heard the announcement. But, I did. Don’t tell anybody.
This article will show you how to hook up a custom Node.js 11 runtime to AWS Lambda. We’ll create a simple Serverless project with a sample function, and add a layer that will enable us to run the Node.js …
Ever since AWS made a serverless option of AWS RDS Aurora generally available, I’ve been on the edge of my seat, eagerly anticipating all the various possibilities. It would mean a breakthrough in building serverless architectures. No more managing connection pools with SQL. No more worrying about capping out available connections. This would make it viable to use serverless for database intensive operations.
I wrote an article a while back explaining how to build a serverless API with MongoDB. But, I saw a pattern emerge. …
In the wake of the Hacktoberfest we’ve seen a huge growth in open source contributions. The open-source community has opened over 400 000 pull requests during October alone. That’s insane!
I started looking into projects with large amounts of contributions. It got me thinking. A common pattern started appearing. They all have amazing
readme.md files. I doubt it would have been easy to contribute otherwise. There may be a connection. I’d sure say there is!
Let’s mention a few famous projects like React, Vue, freeCodeCamp, Sourcerer or Serverless. You can see their
readme.md’s are a perfect blend of documentation, project overview, FAQ, and contribution steps. …