In my experience, this is a very uncertain area. I've had places that wouldn't hire me with 2 years missing experience, even though I was going through college for that industry at the time. I've also been hired without any professional experience, but I had to prove my ability with a test or mini-project. I've also had employers that wouldn't hire me without being 100% convinced I was living in the area.
Unfortunately, I've been laid off many times and have spent a lot of time looking, so I've run into a wide range of responses to things.
The Bad News
The most likely problem you'll have is people not believing you are in the area local to their office. I spent 20 years trying to find a job that I would relocate to. It took me actually relocating to make it happen. And it didn't really happen until I worked as a temp/gig worker and could put the job (and it's location) on my resume.
If you spend a couple years on the road, you'll likely not have any permanent address, which will be counted as a negative for many employers. HR unfortunately has a tendency to be overly cautious and make bad assumptions. Don't be deceived, unless it's a small company, HR is the first place your resume/CV is seen at the company, not the actual hiring manager, so HR will toss your application or resume/CV for literally any reason. Even in a small company, if the hiring manager has a large amount of applicants and you don't have anything on your resume/CV for 2 years, they'll also throw it away. Many times, managers just don't have the time to get specifics for "the why".
The Other Bad News
Some places will refuse to believe you can remember any job related task past about 6-8 months ago.
Programming is very problematic this way, since this is very much an area where "if you don't use it, you lose it" happens. Even people with years of experience have trouble remembering how to do something they haven't done in a year, let alone 2-5 years.
I used to worked as a computer tech, and even 2 years was too much for one employer. They seemed to think that the technology "just moved too fast" for me to keep up without having a job, even though I was going to college for it at the time and, really, things hadn't significantly changed.
More Bad News
If you take any jobs during your travels, or even if you don't, you'll likely get questions about why you "left the industry" and "want to get back in". I got those questions when I switched from computer tech to programmer, as if they weren't related in any way. Just make sure you have a good answer and most people will understand. Unfortunately, some won't. Maybe those aren't the employers you want to work for anyway, but reducing your potential employer pool can be disheartening.
The Really Bad News
Financially, you aren't prepared. Just 2 years ago, I moved halfway across the US and spent around $15k in rent, food, gas, other bills, and more while trying to find a job. I was living in just about the lowest rent I could find, eating as little and as cheaply as I could, and not paying for anything that wasn't absolutely necessary. This was only 6 months, too. Not only do you have to consider the time to find a job, but also the time before you get that first paycheck, local fees to get your car registered, and more.
You'll likely spend considerably more money than you think you will. Not only while traveling but also when you start looking for work again. There's always stuff you don't expect or will "add up" quickly. If you don't have a budget down ot the penny, you really don't know how much you'll spend, and even if you do have that budget, you aren't likely to stick to it. There's just too many things that pop up to account for now. You might be able to account for your morning coffee, but what if you meet some really great people and spend the whole day eating and drinking coffee with them, or they take you on side trip to a special locale that most vacationers never see?
All this depends on your locations and destinations, and you could easily spend more time looking for a job than I did. I had just left a job to do the move, which I had been in the position for nearly 2 years, with a total of 6 solid years of employment at that time. Unfortunately, you aren't likely to find a job quickly, unless you know someone or your old job is willing to take you back.
And since you haven't been working, you won't be able to claim unemployment benefits. You'll have to rely 100% on your savings and anything you can get from your family, which generally isn't good for family relations.
Suggestions
Yes, I've been pretty negative about your idea, but I think you can still do it if you are careful.
There's a lot of remote work around. Some of it is steady and some is temp/gig/contract work. I know you want to do a major vacation and just have fun, but keeping a tie in with the industry will help you later. Most of the negatives I mentioned earlier will be easier to answer and some won't matter as much, if at all.
Yes, you'll still get questions about why you moved around so much and why you became a gig/temp/contract worker & now want steady employment (yes, that's definitely a question I've been asked), but you'll have better answers than "I wanted to backpack for a couple years". I'm not saying that's a bad answer, I'm saying some employers will think it's a bad answer.
Getting short term gigs can help you with finances as well as keeping the connection. It can also open connections. My first job after moving was only for 6 weeks, but they liked me and I think they would have brought me on full time or at least had me for other temp jobs if I hadn't landed a full time job.
I've heard of some companies using remote "gig workers" as a sort of test to see if you are worth becoming an employee. It's not common, but it happens. It's more common that you are an in-office temp-to-hire where they judge you, but businesses are learning that the "old ways" aren't always relevant anymore. I've worked plenty of temp-to-hire jobs that had no intention of hiring, they just had better results in getting responses to their job descriptions if it said it had a chance for full time work. But I think I'm getting off topic here.
Conclusion
With a little more preparation, savings, and work, you taking time off work is absolutely doable. Just don't make too many assumptions about easily coming back to work. You'll likely have to work hard to get a job again.
Edit:
As Tonny mentions in the comments below, make sure you don't violate your Visa(s) in the various places you visit, as working or even volunteering may violate it. You might still be able to work on an open source project while there, but to be on the safe side, it might just be easier to take that as part of your planned vaca, instead of the "work" part.