Treblle API Talks: Sastaticket

We talked to one of the biggest internal flights providers in Pakistan about their API and how Treblle helps them.

2 years ago   •   8 min read

By Davor Kolenc
Table of contents

Treblle API Talks is a series of interviews we did with our users. We talk about APIs in general, API observability and how Treblle helps them gain much needed context on how their API is performing.

Taking Flight With Sastaticket

You can quite literally take flights with Sastaticket.pk. We’ll talk all about this in a moment. Many of our users are startups, and many take “flight” because they have great products and amazing APIs. Not to be modest, we like to think Treblle helps out with the API part of it.

Talking about flights, one of our users is a company named Sastaticket from Pakistan. They are a travel website where you can book a flight, a bus, or a hotel and for the past several months, they’ve been using Treblle to help them out.

We had a little talk with their CTO, Mashhood Rastgar. It was a really great conversation with a lot of insights on how a company like Sastaticket can get value from an API observability platform like Treblle. A really great use case for us, so thank you Mashhood for taking the time to talk to us.

About Sastaticket

Mashood was kind enough to tell us a little bit about Sastaticket. The company has been around since 2016., and was focused on internal flights in Pakistan. Keep in mind that Pakistan is a huge market with over 200 million people living there, so this was no small task. Sastaticket is a sister company to an already quite well-established b2b travel company, and this is them expanding into the b2c market.

We asked Mashhood how are they doing at the moment in terms of market share and users.

Mashhood: “So there's something like 11B$ in travel here in Pakistan, so we are focused on several verticals, that take up 30-40% of that vertical. If we are talking users, we get tens of thousands of users per day, somewhere along those lines. So that all leads to about 23 - 25% of all domestic flights sold in Pakistan. For international flights, it is slightly lower, but we’re kind of building that up as well.”

You can imagine that there are a lot of API calls going on here, especially when we know that they now provide not only flight tickets for their customers, but hotels and bus tickets as well. Sastaticket has its own API of course, and it is essential for them to have the ability to see what is happening at all times. They also pull from other APIs, and others pull from theirs so there’s a lot of traffic going on. Pretty lively and exciting.

Sastaticket API Performance Unchaining the Django on Treblle

We asked Mashhood to talk a little bit about their API, what stack are they using and what are some of the issues Treblle helps them with.

Mashhood explained how his team does everything with a Python framework called Django (Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design).

One of the first questions we asked was if there were any statistics Mashhood could provide us with, like the number of API calls they have.

Mashhood: So we currently have 30-40K just as a load on our search endpoint during the day. Our normal RPS is 5-6. So we are not talking about extremely high loads, but usually, the problems begin when there are spikes basically. There might be a spike that might go up to 70-80 requests per second. Our servers will scale up but how do I then handle all of those additional responses and schedule them in a nice way, so they are documented and saved down the road.”

What Mashhood is talking about here is the usual concern of many developers we talk to. It’s if we can handle the load. The simple answer is, yes. If you want to find out how, Vedran explains it all in a post here, where we explain the logistics of how we scale Treblle to process millions of API requests per month without breaking a sweat.

How does Treblle scale on AWS without breaking the bank?

Here’s Vedran addressing this in our interview:

Vedran: As far as we go, you don’t have to worry about that. We right know process around 40M requests per month, so if you have 1M per month it will not be an issue, including the spikes.

We can process 10K to 50K requests per second, and we can even increase that specifically for you if you ever need that.

And also we have a couple of things that we could do specifically if you guys would want a ‘bigger pipe’ and you think that it’s just gonna increase.

One of the things that we do is a private lane. We can literally create your specific custom endpoint to intake all of your logs, so you would on your own get 100K requests per second on the intake side and 10M requests on the database side. So that is really, not an issue.”

Sastaticket API Use Case - How does Treblle help

So, what is the Sastaticket use case? How does Treblle help Mashhood and his team with their API at the moment? Mashhood shared with us the initial use case when they essentially just discovered Treblle.

💡
So our QA teams, our Frontend teams, and our backend teams, we wanted to have a single source of truth where anybody go and see what they were doing.” Mashhood Rastgar, CTO

Mashhood: “So I’ll share the initial use case. When we actually came across Treblle internally within our own company we had an issue with our own documentation. So our QA teams, our Frontend teams, and our backend teams wanted to have a single source of truth where anybody goes and sees what they were doing.

So in the past, we had used different things. We had used Postman, we’ve used Swagger. The problem that we kept running into, which Treblle solves, is that they would get out of date pretty fast. And having different variations, examples, all that stuff.

So, that was the starting point, and now as we kind of adopt Treblle as a tool within our documentation, we’re exploring it further.

One of the more important use cases, that is pretty obvious now to us is also sharing this documentation with our affiliates. We have a lot of people using our APIs so we can now give them that good experience of just seeing all of that stuff. Not just the request that they’re making but also just standard documentation of this is how you made the request.”

All of this was of course a conversation, so we were not the only ones with questions. Mashhood had some interesting suggestions as well.

Exampe of API docs within the Treblle dashboard

Mashhood:One thing, I don’t know if you guys already have this or not on Treblle. So, allowing a particular affiliate to see their requests was something that came up as a question.

For example, there’s a developer that always heads to some endpoint or IP. Can we create a specific view for them and share it with them, so they can see their request responses coming in? And they can obviously sync with us when needed.”

Vedran: “That is a great suggestion. So 2 comments.

Right now we are working on our summer release. Its going to revamp the entire design. It will be much more data and more polished.

One of the things that it’s going to allow you to do is to publish your documentation on Treblle and invite specific people to that doc.

So not just the real-time part, but also specifically to documentation.
We can share that with you as early as we get it.

The second part you mentioned is actually something that I call interactive documentation. The only question is how do you secure that?

Because, if you use IP address to try to show them what requests they’re making, I can basically, potentially hijack their wi-fi, and see the requests. That’s a risk.

What we could maybe do is this. You give them a subset of API keys. So you identify them via API key and then we kind of expose a little portal to them whenever they make a request. They only see the request within that API key. Is that something that could work for you guys?”

Mashhod: That’s definitely something we can explore. I think so. That said. One of the things that crossed my mind was that almost all of our API sessions are authenticated. So, we will have specific headers anyway. We are already sending headers for our authentication so I don’t see a big problem sending another one to Treblle to recognize a subaccount, basically.”

Mashhood was also kind enough to give us a little bit of insight into what kind of stacks are being used by their partners.

💡
Treblle is an SDK that supports 15 different languages. Get started in 5 under 5 minutes and see how Treblle quickly becomes your team's single source of truth.

Mashhood: “There are different kinds of providers. It would depend on what kind of size we’re looking at basically. If you look at the largest airline based in Pakistan they’re going to be using an international solution basically. I would imagine they would be using Java or .Net. That’s a big company and they’ve got complete and good resources.

One of our smaller airlines in Pakistan has a custom build in-house solution based on PHP. It’s mature enough that it works. It can probably handle customizations. But I’m pretty sure they wouldn’t be wanting to change a lot in their systems because it’s pretty old and dated.

Similar story on the bus side of things. Most are actually pretty small. They’re using a mix of PHP and Node.js, these are the 2 more popular stacks here.”

A Flight to the future

Obviously, we are not oracles, so we asked Mashhood what are some of Sastaticket’s plans for the future.

Mashhood: “So we have 2 main focuses.
The primary focus is how to give a better experience to our customers in the travel space. And one of the things that we are always kind of on the back foot is since we are a  powerful developing nation, a lot of the infrastructure here is very weak.
So, we have to kind not only work with our suppliers and our providers, but we also need to take a step forward and give them that feedback.
So maybe we’ll have a lot of people coming to us and saying that “This particular bus provider doesn’t have good busses”. So we kind of have to take that into account and see how we can help our consumers understand what kind of experience are they going to get when they buy a seat on this bus. So a lot of focus on that front.
Another thing is that we are starting to move into slightly more complex products like fintech, dynamic cancellation refunds, hold bookings, hold prices, whatnot… We’re focusing a lot on that front and there’s going to be new verticals of course.”

So, there you have it, folks. There are more interesting interviews to come. We’ll be talking to developers, CTOs, project managers, and so on. The purpose is to show how technical, but also not-so-technical people are all using Treblle and getting value from it.

Sastaticket is already getting awesome values since Treblle became the single source of truth for their entire team, and then for some of their partners as well.

We expect to be hearing great things from Mashhood in the future and we are sure they’ve boarded the correct flight to achieve all of their success goals.

They are also active members of our Slack community. Don’t hesitate to join them and us on there. If you want to join just follow this link.

As always, until next time,
Stay in tune with your APIs!

Spread the word

Keep reading