Fn Serverless and Caddy: An Interview with Dan Anderson

Dan Anderson

Dan Anderson is a Product Manager at JDK Technologies. He’s a self-described weekend hacker that delves into open source projects to expand his technical skills and learn new cutting-edge technologies. On a recent project, Dan explored how to configure Caddy as a poxy to an FN server. We interviewed Dan to learn more about it, serverless technology, and his other pursuits in open source projects. Read on to see what we learned. 

Q: The project you worked on involves serverless and containers. Can you describe what each are and the role they play in developing web services?

jsoto-100x100
dan-100x100

In the simplest terms, Serverless computing is an operating model in which a cloud provider takes on the task of provisioning, maintaining, and scaling the servers or computers on which cloud-based products run. Containers provide a similar advantage, but at the computer or server operating system level.

A program interacts with the operating system to use the computer’s resources such as the CPU, memory, and attached storage. The operating system environment can vary in terms of hardware (e.g. Mac, Intel based Windows) and software (e.g. MacOS vs. MS Windows, Ubuntu vs. Fedora), and even software releases (Windows 7 vs. 10).

Containers provide an operating environment on top of a computer’s operating system so that programs running within that operating environment have a consistent way to interact with the underlying computer. It’s like traveling to a foreign country with a friend who speaks the local language. You can always turn to her and make your requests in the language and manner you know best and she handles the rest!

As a Product Manager, my focus is to deliver a product that solves the needs of users. Serverless technologies & platforms and container solutions help remove or abstract much of the complexity of operating cloud-enabled software products. Our developers can then do what they do best which is build and enhance functionality that solves our users’ challenges.

Q: What is the Fn Project? And why is it important to serverless technology?

jsoto-100x100
dan-100x100

The Fn Project is an open source functions as a service (“FaaS”) computing platform. It is a type of serverless technology. Serverless comes in two major flavors. Backends as a Service (“BaaS”) or FaaS. Backend server environments are typically characterized by servers that are continuously executing to handle computing needs. A web server is an example which is always running to handle the request when you type in the URL of your favorite website. If there are a lot of visitors to the website, if the site is running in a serverless environment, the platform will “scale” or detect the increased traffic and start additional servers to handle the demand.

FaaS platforms are a little different. Typically those platforms will start a computing process to handle a request triggered by an event. When that task is complete the process stops. This is helpful for computing needed to accommodate discrete tasks such as sending out emails to enable a user to reset their account password. This type of request is not happening constantly and the task is asynchronous. In other words, it happens in the background and is discrete: check the user’s email, construct an email with a link the user can use to start the reset process, and send the email. The resources that would have been used by the backend to send reset emails can now be consumed more efficiently by a function executing in a FaaS environment.

I love the Fn Project because it is a full featured open source FaaS that is quite easy to use. I was looking for something to help me build out rudimentary prototypes while learning FaaS principles and methods.

While many of the major cloud providers offer FaaS technology (e.g. AWS Lambda, Google Cloud Functions), Fn can be run anywhere like the serverless platform of your choice (AWS, Azure, Google Cloud), a laptop or local computer, or in an on premise data center. As a case in point, I test my Fn Project functions on my laptop and run “production” functions on a server hosted by DigitalOcean.

Fn takes full advantage of containers. Each function executes in a container. Wherever that function code runs, the operating environment for that code remains the same on my laptop, my DigitalOcean server, or AWS. This is a great benefit that allows developers to focus exclusively on functionality and not necessarily worry about the very different environments in which that function or code may run.

Q: What about Caddy? What is it and who uses it? In your opinion, do you think technologies like Caddy are changing how companies can make their web services more secure? How is it better than traditional web server security methods?

jsoto-100x100
dan-100x100
Caddy Server Logo

Caddy is a web server. Caddy can serve static and dynamic web pages and execute more sophisticated operations such as load balancing where high web traffic can be balanced across multiple servers.

Web servers are traditionally complex to configure and maintain. As a Product Manager, maintaining a web server was definitely not something I wanted to spend a lot of time investigating. Caddy is great in that configuration is simple and straightforward with a small configuration file. The big bonus for me and most Caddy users is that Caddy will automatically provision an SSL/TLS certificate from Let’s Encrypt, a free and open Certificate Authority. This enables my web services to handle and serve encrypted web requests like a bank or investing website.

I just have to enter my domain (e.g. ‘example.com’) that I or my company owns and Caddy does the rest: triggers the provisioning process from Let’s Encrypt, obtains the SSL/TLS certificate, and installs the certificate in the web server code. Let’sEncrypt.org and the Caddy contributor team each have a mission to enable HTTPS or secure web traffic for everyone.

As our business and professional lives become ever more dependent on the web, this is a fantastic enabling service. With a minimum amount of time, effort, and expense I can leverage the same secure protocols used by leading sites and platforms.

Over 65,000 sites use Caddy today. It’s simple enough to configure and deploy for a sometime techie like me but bulletproof and function laden enough for large scale web serving.

Q: In your opinion, how are containers and serverless revolutionizing how technologies perform? Do you see a future for serverless technologies?

jsoto-100x100
dan-100x100

In my opinion serverless is another big step in the never ending effort to remove complexity and enable people to focus on core value-added tasks. As technologies improve and evolve, the underlying complexity can be overwhelming. We’ll need technology to help manage that for us humans.

I have been around long enough to remember the adage of “make it work like the telephone”. That is, technology gets mass adoption when it works as seamlessly as the plain, old, copper wired telephone. Back in the day, you picked up the receiver of your banana-colored phone with the really long cord and it (almost) always worked. All of the genius, engineering, and operating brilliance was abstracted away from us callers dialing Grandma across the country.

Q: You work on open source projects during off-hours. On the product management side, how does this help you serve JDK clients better?

jsoto-100x100
dan-100x100

I am definitely a user of open source software and appreciate all the hard work that goes into releasing and maintaining that software. I have made just a handful of open source contributions mostly fixing pedestrian bugs and improving documentation.

Using open source software has been critical in doing my weekend hacking, developing software and early stage software products. This process enables me to interact with clients and look at rough apps and think deeply about the user experience and value added functionality. It has also helped me interact with developers as I have a much better understanding of the challenges they face in particular trading off complexity versus value.

Q: What open source project is next on your list?

jsoto-100x100
dan-100x100

The one open source project and backing company I am excited about is GoChain. GoChain is in the Blockchain space and is a web3 based blockchain technology that is 10x more decentralized, 100x Faster, and 1000x greener than the big technologies such as Bitcoin and Ethereum.

The co-founders of the Fn Project are the CTO and advisor of GoChain respectively. Needless to say that got my attention! I am not a big cryptocurrency person, but I believe blockchain has great potential to solve real world business problems in domains such as personal identity, payments, health care, and supply chain management.

I am working on proof of concept applications for GoChain (and Ethereum) and have been very impressed with the GoChain tools and ecosystem.

jsoto-100x100

It was great to learn more about what Dan is doing in the realm of serverless technologies. Like Dan, there are others on the JDK team that invest time and interest in open source projects like mind-controlled devices. This expands their professional knowledge and skillset in using disruptive emergent technologies like serverless and blockchain to better serve our clients. Right on!

Share on facebook
Share on google
Share on twitter
Share on linkedin
Recommended Posts
IT Automation - Company Success