Microservices with API Gateway, AWS Lambda and JVM languages

At Trainline we use AWS Lambda [1] in conjunction with API Gateway [2] for some of our microservices. Different teams use different languages, but in the Data Engineering team we use Clojure [3] – which is a JVM based functional programming language. Here we share some of the experiences we’ve had developing and deploying REST based APIs using JVM based Lambdas.

Although we normally use Clojure, in this blog post we will present a Java based example (for the benefit of a wider audience). However, we expect that the same results would apply to all JVM based languages (Clojure, Scala, Groovy, etc.) Continue reading

Trainline Environment Manager – Now Open Source!

Background

Trainline is Europe’s leading independent Rail ticket retailer, selling £2.3bn tickets per year and enabling our customers to make more than 100,000 smarter journeys every day. We have 150 development staff who are constantly improving our user experiences, and our need to innovate means that we cannot allow the underlying infrastructure to be a constraint on time to market.

This desire for infrastructure agility recently led us to migrate 100% of our Development, Staging, UAT and Production environments from legacy private data-centre to Amazon’s public Cloud. Simply lifting and shifting components into the Cloud would have improved agility somewhat, but for us this was just the starting point. Continue reading

Supercharging your Production Monitoring

At Trainline our development teams have moved on a lot from what we were doing a while back to what and how we are doing things today. Here are just a few of the things that have completely changed in just the last couple of years: moving to continuous delivery, massive increase in automation testing, new infrastructure, green-blue deployments, load balancing, alerting and monitoring.

What has taken my interest in the last year is the extent of the monitoring that we have available now and how we need to choose what to look at and what not to. Continue reading

New Relic in action at trainline #futurestack

Toward the end of last year I was invited to present at New Relic’s FutureStack conference in their Hacker Lounge track. I had a great time and it was great to introduce trainline to those across the pond and further afield.

All the sessions were filmed and mine has made it onto Youtube. The talk was on how we at the trainline adopted and scaled the use of New Relic across the entire organisation and the value that we’re getting out of it, including how team KPIs are judged on some of the metrics we get out of New Relic.

Video

Paul Kiddie – New Relic in action at trainline Continue reading

AWS CodeDeploy: Heads Up

AWSCodeDeployLogoAt Trainline we embarked on an ambitious cloud migration journey to AWS around a year ago and as part of this we’ve adopted AWS CodeDeploy as our deployment management mechanism.

I recently presented at the DevOps Exchange Meetup in London on this topic. I discussed where we’re up to with a focus on some interesting challenges we’ve faced getting CodeDeploy to play nicely with our hosting model.

Here are the slides from my talk: Continue reading

Building AMIs with Packer

During the planning stages of our migration to AWS, we identified the need to create custom images (AMI’s) as the base for new instances. While we are relatively experienced with Chef, we found that running Chef at instance launch time was much longer than acceptable. Creating custom AMI’s that are preconfigured (known as baking) allowed us to shift the heavy lifting from instance launch time to an earlier, out-of-band time.

In designing this process, we came up with multiple goals – we needed to have a reliable, repeatable, auditable and tested process with a fast spin-up time. This post explores our recent infrastructure automation efforts in this area.

Continue reading