The Doppler Quarterly Spring 2017 | Page 42

1. Security The same best practices apply with serverless functions as you would be expected to apply in your server-based deployments. Some ideas to consider: • Identity management is still a first line of defense. • One interesting pattern that has emerged is a function wrapper that passes the trigger event input to a security analyzer (i.e., Alert Logic), and only proceeds to the main function once a content OK result is returned. • Use of API Gateways as a protective front end to your endpoints. 2. Monitoring This has been cited as a tricky part of the serverless equation, but, for example, AWS uses Amazon CloudWatch as the de facto mechanism to monitor your AWS Lambda functions, which makes it a seamless addition to the rest of your standard AWS monitoring. 3. Latency Latency is another issue to consider with serverless computing. Note that Java can be slow to start if it’s not called frequently due to the JVM startup. But that is not the case with JavaScript or Python. 4. Language Versions Depending on the language you choose for your serverless functions, you may find issues with the version supported by the service. For instance, AWS Lambda currently supports Node.js v4.3.2 whereas the recommended version is v6.10.0. At the same time, AWS Beanstalk supports v6.9.1. So even maintain- ing consistency across services within a given cloud provider is a challenge. 5. Limitations The various cloud providers have different limitations built into their server- less offerings, including constraints such as maximum execution duration, maximum request and response payload sizes, maximum temp disk space, concurrent executions, etc. Note that some of these limitations can be increased upon request from the provider. Real World Examples Bustle.com is a news, entertainment, lifestyle and fashion website with over 50M monthly readers. Bustle was struggling with scaling issues and infra- structure management overhead. They moved to a serverless architecture, halved the operations team and experienced over 80% overall cost savings. Moonmail provides an email marketing platform for the eCommerce commu- 40 | THE DOPPLER | SPRING 2017