Start serverless
with Golang
Danggeun Market, SEP 26 2019
Byun Kyuhyun
Danggeun Market
Software engineer
Introduction
- Danggeun Market Software engineer
- AWSKRUG Serverless Group Organizer
- CircleCI User Group Organizer
- Node.js, AWS, DevOps, Serverless
- Golang, Typescript, Javascript, French
- https://novemberde.github.io
- https://github.com/novemberde
Introduction 01
Serverless
Why golang
Benefits
Demo
References
02
03
04
05
06
Serverless
Serverless
● Eliminates the need to manage application servers
● Focus on business logic
● No worries about infrastructure growth
● Little time to set up or optimize servers
● Very little charge for services used during the
development period(Based on AWS Lambda)
● Easy to integrate with other services
● No need to access server
● Accelerate development
Serverless - Problems
● Require POC for the migration to serverless architecture
● Require understanding Cloud Provider services
(AWS - Lambda, Azure - Function, GCP - Function)
● Require knowing Debugging tools
● Could be more expensive than EC2
Serverless - AWS Lambda
● Supports all of languages and runtimes
(Golang, Node.js, Python, .Net core, Java ...)
● Logging & Monitoring through CloudWatch
● Easy to bind with API Gateway & Application Load Balancer
● Support Websocket and REST API in API Gateway
● No concerns of scale-out
● Enable processing & caching on CloudFront
Serverless - Serverless Framework
● Easy and Simple code to deploy serverless infrastructure
● Supports language templates
● Biggest community in Serverless
● Supports 8 cloud providers
(AWS, GCP, Azure, Kubeless, Spotinst, Cloudflare, Alibaba
Cloud, Openwhisk)
● Support SODD(Stack Overflow driven development)
Why Golang?
{
Why Golang?
Easy
No dependencies
No node_modules
No requirements.txt
No os dependencies
No build issues
No performance issues
01. BACKGROUND
{
Why Golang?
Simple
Only one binary output
Usage
01. BACKGROUND
Benefits
Golang
Benefits
.
├── README.md
└── bin
└── rest
Node.js
.
├── README.md
├── app.js
├── handler.js
├── package-lock.json
├── package.json
├── routes
│ └── todo.js
├── serverless.yml
├── spec
│ └── todo.spec.js
├── node_modules
│ └── ...
├── template.yaml
└── test
└── handler.js
Demo
Enhancement of
AWS Lambda
Resolved the cold start issue of AWS Lambda
● Added provisioned concurrency
https://aws.amazon.com/ko/about-aws/whats-new/2019/12/aws-lambda-a
nnounces-provisioned-concurrency/
● Improved VPC networking
https://aws.amazon.com/ko/blogs/compute/announcing-improved-vpc-net
working-for-aws-lambda-functions/
Disable provisioned concurrency
Enable provisioned concurrency
References
● https://github.com/awslabs/aws-lambda-go-api-proxy
● https://echo.labstack.com/guide
● https://serverless.com/
● https://github.com/novemberde/go-serverless-demo
● https://novemberde.github.io/ppts/svelte/
● https://github.com/spf13/cobra
We’re hiring!!
bit.ly/dangguen
Thank you :)
Email: novemberde1@gmail.com
Blog: https://novemberde.github.io
Github:https://github.com/novemberde

Start Serverless with Golang!